qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Greig" <robert.j.gr...@gmail.com>
Subject Re: JMS: No Route (error 312)
Date Mon, 07 Jul 2008 19:28:32 GMT
2008/7/7 Shahbaz Chaudhary <schaudhary@marcopolonetwork.com>:

> In the link, someone advises that Qpid specific session should be used
> instead of JMS specific session.  When topic producer is created
> (createProducer(...)), pass in false as the mandatory flag.

Yes, the mandatory flag is part of the underlying AMQP protocol.

> Two problems:
> Where do I use the qpid specific session?  Is there a qpid specific
> version of TopicSession?

We have an "extended JMS" API which has interfaces that are subclasses
of javax.jms.Connection, Session etc but provide some extra methods
and fields.

To access these, cast your javax.jms.Session to an
org.apache.qpid.jms.Session and then you should see some extra methods
that allow you to specify the mandatory flag on the producer.

> Secondly, I am creating topic producer by using
> "session.createPublisher(mytopic)". I haven't found any document which
> describes the difference between .createPublisher and .createProducer.
> Which is the right one to use?

A TopicPublisher is a JMS 1.0 concept, it was unified in JMS 1.1 to a
producer. Use a producer since that is uniform across Queues and


View raw message