What is Java Message Service (JMS) for?

前端 未结 8 1968
[愿得一人]
[愿得一人] 2021-01-30 02:19

I am currently evaluating JMS and I don\'t get what I could use it for.

Currently, I believe this would be a Usecase: I want to create a SalesInvoice PDF and print it w

8条回答
  •  一向
    一向 (楼主)
    2021-01-30 02:54

    Why would a need a Standalone Server for Message Processing, vs. e.g. some simple inproc processing with Quartz scheduler?

    The strength of JMS lies in the fact that you can have multiple producers and multiple consumers for the same queue, and the JMS broker manages the load.

    If you have multiple producers but a single consumer, you can use other approaches as well, such as a quartz scheduler and a database table. But as soon as you have multiple consumer, the locking scheme become very hard to design; better go for already approved messaging solution. See these other answers from me for a few more details: Why choosing JMS for asynchronous solution ? and Producer/consumer system using database

    The other points are just too vague to be answered.

提交回复
热议问题