Currently we are working on a project and we are in design and architecture phase of the project following are main points of projects.
Now the problem is what is best way for communication between CompA adn Comp B
One way is
1. CompA--------> CompB 2. CompA-------->Messaging Server(JMS)------> CompB
Requirment: There will be more than one CompA and CompB is the system and if any component fails it load will be shared by other peers e.g if CompA fails its load will be shared by other CompA instances in the system. For that we are going for second option with JMS so that CompA is not tightly bound with CompB. But as new Component (Messaging Server)is introduced this may cause performance degradation as the record processing is transactional the system is real time.
Your suggestions and expert advices will be highly appriciated
JMS is the way to go - http://docs.oracle.com/javaee/6/tutorial/doc/bnceh.html
It is very reliable, you can do things like set message expirations and enforce priorities and it is perfect for your model which is basically a "Multiple producer/multiple consumer" over the network.
JMS supports transactions and it is built for reliability - by far it is the most reliable mechanism available. Performance-wise, you should talk about "scalability" more than "raw performances". Provided your hardware can cope, JMS will.
Wikipedia has a very good list of available JMS implementations: http://en.wikipedia.org/wiki/Java_Message_Service#Provider_implementations
I have used Apache ActiveMQ, Open Message Queue and OpenJMS and, even if I have no experience of deployment of JMS servers on a clustered environment, I agree ActiveMQ is the most reliable solution I used.
I would suggest to use JMS with spring integration. check example
In my case we have used ActiveMq with spring integration so that we were able to handle loadbalancing and fail over fetures easily.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With