Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compare: JMX vs JMS [closed]

I thought JMX was a specification and JMS was more like an implementation. I was asked the difference between the two and the questioner disagreed with this. I read about it and understood both are specifications. And saw "JMX is a monitoring spec, not a publish/subscribe spec.You could beat it into a publish/subscribe model but that is more what JMS is supposed to do for you." What does this exactly mean? And what is their difference and when to go for one or the other and both.

like image 215
RBz Avatar asked Jul 30 '16 08:07

RBz


1 Answers

Quoting from Wikipedia.

"The Java Message Service (JMS) API is a Java Message Oriented Middleware (MOM) API for sending messages between two or more clients."

In simple terms: it is for passing messages.

"Java Management Extensions (JMX) is a Java technology that supplies tools for managing and monitoring applications, system objects, devices (such as printers) and service-oriented networks."

In simple terms: it is for monitoring things.

What is their difference and when to go for one or the other and both.

If you read the above, that should be self evident.

  • You would use JMS when you are building an system that needs (reliable, robust, resilient) message passing between different components (typically) on different computers.

  • You would JMX when you are implementing monitoring for your system.

(Obviously there are alternatives for both.)


I saw "JMX is a monitoring spec, not a publish/subscribe spec. You could beat it into a publish/subscribe model but that is more what JMS is supposed to do for you." What does this exactly mean?

It is difficult without seeing the context, but I think this is a response to someone else suggesting the JMX could be used to support publish-subscribe ... for something. And the guy who wrote this seems to be saying "bad idea: use JMS".

Taken out of context, it is pretty meaningless. I'd advise not trying to extract deep meaning ....

like image 175
Stephen C Avatar answered Oct 16 '22 15:10

Stephen C