What is Java Message Service (JMS) for?

前端 未结 8 2131
[愿得一人]
[愿得一人] 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:57

    What ist Java Message Service (JMS) for

    JMS is a messaging standard that allows Java EE applications to create, send, receive, and consume messages in a loosely coupled, reliable, and asynchronous way. I'd suggest to read the Java Message Service API Overview for more details.

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

    Sure, in your case, Quartz is an option. But what if the invoice system is a remote system? What if you don't want to wait for the answer? What if the remote system is down when you want to communicate with it? What if the network is not always available? This is where JMS comes in. JMS allows to send a message guaranteed to be delivered and to consume it in a transactional way (sending or consuming a message can be part of a global transaction).

    How does it interact with my application?

    JMS supports two communication modes: point-to-point and publish/subscribe (if this answers the question).

    Isn't it much too slow?

    The MOMs I've been working with were blazing fast.

    What are Usecases you already implemented successfully?

    Used in system such as a reservation application, a banking back-office (processing market data), or more simply to send emails.

    See also

    • EJB Message-Driven Beans

提交回复
热议问题