Reputation: 1131
Conceptually speaking, when should we use asynchronous messaging ? And why? Couldn't we store message contents to some DB Store and evetually running a scheduled job in order to process those messages ?
Using JMS or AMQP, for example, brings real advantages to systems development ? Is there a way to simplify this design and obtain same results ?
Upvotes: 0
Views: 156
Reputation:
Shortly, yes, you can use DB instead if it fits your needs by speed and other resources like (CPU/RAM). As any specialized solution, JMS allows you to maximally effictively solve the specific class of tasks - asyncronous messaging.
Also, for example, using JMS you can have some sort of scalability solutions "out of the box": you can subscribe from different instanses of service to events from single queue, so the JMS will do load balancing autimatically depending on performance of your event processor services.
Along with queues there are another useful objects here - topics. They are useful to broadcast events to several subscribers simultaneously, so you'll need to implement it by yourself.
Upvotes: 3