6

I heard a guy from IBM give a talk about MQTT and he said that MQTT is the most lightweight messaging protocol as of today. His argument was that the smallest overhead produced for a single message is 2 bytes. However, I've heard the very same (2 bytes overhead) about HTML5 WebSockets too? Anyways, as I plan to use Open MQ as a JMS provider for a messaging application, which protocol my provider use became of interest to me. I cannot anywhere find the answer to that question and I even googled the Open MQ documentation and the documentation of GlassFish which use Open MQ as a JMS provider. Some blog posts and the like on Internet says AMQP but I cannot find a solid reference to back that statement up.

Which protocol does Open MQ use, and how would you know?

Martin Andersson
  • 18,072
  • 9
  • 87
  • 115

2 Answers2

7

I think you mix a few things up: MQTT is an application level protocol and uses TCP as transport protocol. MQTT can also be used with Websockets as transport. MQTT is, if you will, a lightweight alternative to JMS and AMQP.

AMQP is a popular and reliable alternative to JMS and is well suited for business and mission critical messaging. It is very feature rich and widely used. Note that AMQP is a messaging protocol while JMS is an API (which can even use AMQP as transport). You can use AMQP directly in Java Applications with Libraries such as the RabbitMQ Java Client.

MQTT on the other hand is perfect fit for telemetry data and scenarios where you have many clients which communicate with a single message broker and where low bandwidth usage, memory efficiency and battery life on the clients is key.

JMS does not define any transport protocol (in contrast to MQTT) and anything could be used here. I personally think TCP is a good fit here, too.

I do not know about OpenMQ but for JMS and AMQP I can recommend ActiveMQ. For MQTT there are a few brokers out there including HiveMQ and Mosquitto.

Obligatory Disclaimer: I am a developer of HiveMQ, so I am probably a bit biased ;-)

Dominik Obermaier
  • 5,610
  • 4
  • 34
  • 45
  • 2
    Dominik, thank you for an excellent answer. But isn't it possible for Open MQ to run JMS over AMQP? You speak of AMQP as an "alternative" to JMS, but JMS is just an API. – Martin Andersson Jun 07 '13 at 14:07
  • Martin, I clarified some parts of the answer regarding the "alternative" part. It seems that OpenMQ uses TCP as default transport protocol. The documentation is not very good on that imho. As this was your original question, I am sorry, I can not give the final answer on that. Hopefully someone else can help out :) – Dominik Obermaier Jun 07 '13 at 20:26
  • 1
    Dominik, wish I could accept your answer. Let me just tell ya that you've been a great help to me. However, I was looking for answers with an authoritative source to go along so I cannot check your reply as the answer to my question. You do seem to be knowledgeable in Java messaging and I feel there's a shortage of blog posts and tutorials on how Java messaging really works. Perhaps you could post such an article on the Internet? – Martin Andersson Jun 08 '13 at 15:34
  • JMS is just an api and no Protocol, so MQTT is no alternative to JMS. JMS could be also used on top of MQTT. For example Qpid is using JMS on top of AMQP. I've done a performance test and would recommend RabbitMQ for Messaging. OpenMQ ActiveMQ and Qpid are slower than RabbitMQ. – Ben May 04 '16 at 12:48
  • I am also interested in underlying wire protocol of Open MQ. Unfortunately, this answer doesn't help. – Sergey Shcherbakov Mar 09 '21 at 12:10
0

I think OpenMQ is using STOMP as Application Level Protocl. There is no other documentation which protocol OpenMQ supports than STOMP.

Edit: found the UMS Protocol and it seems OpenMQ is using this per default. https://mq.java.net/4.3-content/ums/umsIntro.html

OpenMQ is not able to use AMQP so I would recommend RabbitMQ.

Ben
  • 696
  • 9
  • 19