0

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 ?

melihcoskun
  • 326
  • 1
  • 4
  • 19

2 Answers2

3

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.

techuser soma
  • 4,766
  • 5
  • 23
  • 43
  • what if I want an immediate response and I need a publish subscribe model and communication should be bidirectional.do you suggest JMS on that case ? – melihcoskun Aug 07 '14 at 04:56
  • jms is an option, take care of message expiry. You can look at other options like multi threading. – techuser soma Aug 07 '14 at 13:41
0

You would want to use JMS (or enterprise messaging) when don't have to rely on all the systems being available. So if one of your internal systems was down for some reason, then a REST api interface would fail when communicating to that system, but a JMS interface would not as you are communicating to the MOM.

For some MOM you don't have to just communicate using JMS, so you can have different runtimes communicate to the MOM.

whitfiea
  • 1,943
  • 10
  • 15
  • You are right, but I think it should be better if I create a heartbeat mechanism and create a messaging queue and use REST API. Because I am worried about performance problems by using JMS.According to so many articles that I read, If I use durable subscriber,synchronize messaging with persistent transaction, JMS will not be so usefull. do you have any suggestion ? – melihcoskun Aug 06 '14 at 11:08
  • It depends on the MOM provider that you use. JMS is just an API at the end of the day and it is the underlying implementation that will dictate the performance/scalability. – whitfiea Aug 06 '14 at 11:14