performancerestjmsesbmom

Why should I use JMS for MOM


I am really curious about this topic. I will create a communication mechanism for internal systems and may also need connection to some external clients too. The internal modules are also distributed systems. I need to create a ESB between that modules. The system should provide high performence over millions of subscribers.

publish subscribe or p2p communications are both needed,

When I first started to thinking about that implementation , I was planed to make a REST api on front and the REST api will communicate with a JMS bus .The JMS bus has an ability to provide communication between internal systems.

Unfortunately as per my investigation, using JMS can be caused so musch critical problems : performance,scalability... and looks like JMS is needless, I can create some adapters over internal modules and both can communicate with REST services.

Does anyone have any idea why should I use JMS for internal communication ?


Solution

  • Both REST and JMS/MQ enable communicate between remote systems (and local). You can get help based on the scenarios below: Some Reasons for using JMS in your case:

    1. If your producer is spitting messages at a very high rate than the consumer then the persistent messaging will help. This may also mean you are fine with the transaction/message to be processed later.
    2. All systems are not up all the time.
    3. You need a publish subscribe mechanism (topic).
    4. Messages are not critical and discard old messages when load is high.

    Reasons for using REST API (without any jms connected):
    1. You want an immediate response that transaction is completed. Example, hotel booking etc.
    2. All systems should be up all the time for processing to complete.