qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leglise Yann" <ylegl...@sopragroup.com>
Subject RE: Mixing up AMQP QPID and JMS
Date Wed, 19 Aug 2009 15:14:28 GMT
Thank you Gordon.

Your answers helped, but I want to make it a little bit clearer about the relation between
QPID and JMS.
I can only see 2 possible interpretation of the relation between JMS and QPID (one will necessarily
be wrong):
1)  QPID relies on (i.e. make use of) a JMS implementation in order to use the JMS services
to satisfy the AMQP purposes,
2)  QPID actually IS a JMS implementation that directly includes the AMQP required behaviour.

This is confusing for me since in my java program, I am linked to a jms.jar (gotten from the
J2EE SDK), in association with the qpid jars, and I suppose this jms.jar contains a JMS implementation
(leading to the first interpretation).

So in the case 1), I cannot understand how a JMS object (that does not "know" I am using a
QPID jar) can interact with an AMQP broker (I mean, when I invoke a send API on a javax.jms.MessageProducer,
how is it that Wireshark detects AMQP frames? The meaning of my question in my previous mail
was to understand how could the JMS objects (defined, according to me, in the jms.jar) could
interact with the QPID jars (I supposed that the AMQP frames are sent by some classes of the
QPID jars) since nothing is (apparently) made to link JMS object with QPID classes).

In case 2), why should I need using the jms.jar if the implementation already exists in the
QPID jars?

The only explanation I can imagine is that the jms.jar is used only for the interfaces like
Connection, Session etc. some implementors of which resides in QPID library that are used
because using org.apache.qpid.jndi.PropertiesFileInitialContextFactory in JNDI. Then, as every
used object (ConnectionFactory, Destination ...) are obtained through a first QPID class implementing
the InitialContext, this implementing class also choose a QPID class implementing those interfaces
(and so on for Connection, Queue ...). This is what I guess, but I would like to have a confirmation
from someone who "knows".


Thank you.


Yann LEGLISE

-----Message d'origine-----
De : Gordon Sim [mailto:gsim@redhat.com] 
Envoyé : mercredi 19 août 2009 16:11
À : users@qpid.apache.org
Objet : Re: Mixing up AMQP QPID and JMS

Leglise Yann wrote:
> Hello,

Hello!

> I had sent a previous mail in the beginning of July concerning an AMQP version problem
between client and broker.
> It is OK for this point, but now I am realizing that the things are still not so clear
for me.
> Here are some assertions I believe as being true (please tell me if I am wrong):
> 
> *	AMQP is mainly inspired by JMS, and specifiy an implentation independent protocol for
queue messaging,


Correct; AMQP is an implementation independent protocol for message queueing applications.

I'm not sure whether all those behind AMQP would say they were 'inspired' by JMS(!). However
I think it's fair to say that JMS has always been an important use case for AMQP.

> *	QPID is an implementation of AMQP available for several languages (i.e. C++, java,
python ...),

Correct.

> *	It is possible to write a QPID java client using JMS objects only (i.e. writing a java
program with not a single org.apache.qpid.* import, even if the qpid jars are necessary for
execution at least for the JNDI initialization that refer to org.apache.qpid.jndi.PropertiesFileInitialContextFactory),

Correct.

> *	QPID java examples make use, in majority, of JMS,

The java examples do, yes.

> *	For QPID java example that does not make use of JMS (amqpexample package), the client
and the broker must use the same AMQP version (I mean, if the broker does not handle the AMQP
version used by the client, no communciation can take place),

Correct.

> So here are my questions:
> 
> 1.	What is the links between QPID and JMS (How is it that using only JMS objects, QPID
libraries are used)?

I'm not entirely sure I understand the question, so forgive me if I state the obvious or go
off in the wrong direction!

JMS is an implementation independent API. A JMS client library will implement all the interfaces
required by JMS and will map those to some underlying network protocol used to communicate
with a broker.

The Qpid JMS client library maps the interface to particular interactions using AMQP. (If
you are looking for details of that mapping, I'll leave that to another mail and perhaps another
person...)

> 2.	Is the AMQP version negociation allowed by JMS and not by QPID?

AMQP defines a simple version check that can be used to ensure the client and server are agreed
on the version to be used. It may well be that there are some bugs around that but expected
behaviour is that you can point the Qpid JMS client at an AMQP broker and it will negotiate
which of the supported versions it will use.

Hope this helps, if not please keep asking questions! Thanks for your interest!

--Gordon.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Mime
View raw message