Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which protocol does JMS use to send and receive messages?

I want to know if JMS API uses any protocol to transfer messages or if uses its own. If the former, which protocol?

I have read many articles over the net but I couldn't find an answer for this.

like image 420
Shabeeralimsn Avatar asked May 27 '14 05:05

Shabeeralimsn


People also ask

Which method is called to receive messages JMS?

A JMS client can consume messages either synchronously or asynchronously. Synchronous: In this mode, a client receives a message by invoking the receive() method of the MessageConsumer object.

Is JMS based on HTTP protocol?

JMS is not a protocol, it's an API specification. It's not something like TCP or HTTP protocol. Simply put the JMS specification defines signature of messaging APIs.

Is JMS a transport protocol?

This section describes the support for the Java™ Message Service transport protocol using SOAP and non-SOAP message formats. For additional information about limitations of the JMS protocol, see Limitations of the JMS Transport protocol.

What port does JMS use?

The default JMS port number is 9127.


1 Answers

The standard JMS API is merely a set of interfaces; JMS providers (such as WebSphere MQ) provide their own implementations for these interfaces.

The only thing that you can say for sure about all JMS implementations is that they all adhere to the JMS API; other than that, a JMS implementation may use any protocol whatsoever in order to fulfill the JMS API contracts.

Now, when you're asking specifically about "protocols", you should also define which "layer" in the communication you are referring to (have a look at the OSI Model, for example). When your JMS client has to talk to a JMS server that is located on another machine on the network (a typical case), the protocol used between the client and the server will be based, in one way or another, on TCP/IP. Over the wire, you'll be able to see TCP/IP packets being exchanged back and forth.

At the higher level, there are no guarantees; you are likely to find proprietary protocols varying between different implementors. Remember that, with JMS, performance is often crucial; JMS vendors put a lot of efforts into ensuring that their protocols ("above" TCP/IP) perform well. HTTP, for example, won't do.

like image 111
Isaac Avatar answered Sep 18 '22 20:09

Isaac