If you want to implement your own queue service then feel free to. The only major advantage is that you donβt need to rely on the third component (JMS server).
If your resource is associated with 10 additional streams and 10 additional sockets, you really have other problems to worry about using a JMS server above and above. No ads require additional costs.
If you donβt need the queue at all, just call the web service on the line and do it.
If you implement it yourself, you need to implement a queue, persistence and recovery (when your system drops by the 29th second and loses 100 unsent messages), restore transactions, reconnect logic, etc.
If I had to do this for one queue in one place with one manufacturer, and JMS servers cost X thousand dollars a year for license fees, etc., then yes, I would, of course, think about remaking this bit of logic. Or if I do not want to record the memory pressure on the JMS server.
But the JMS servers are free, they come with my application server, they are configured with half a dozen mouse clicks, and they are "fast enough" for most needs. Today it is a ubiquitous infrastructure.
It's just that the chances are really high, it's just not worth the effort to invent this wheel, IMHO.
source share