activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mjparme <>
Subject Re: Request/Response with JMS
Date Wed, 18 Apr 2007 19:50:26 GMT

Ok, found my own answer. You just pass "null" as the Desintation:

replyProducer = session.createProducer(null);

Duh! Oh well, can't be smart all the time:-)

mjparme wrote:
> This may be more of a general JMS question rather than Active MQ, but
> hopefully people will help me out anyway. I read this doc:
> Seems easy enough except how do I create a MessageProducer that is not
> associated with a Destination? The JavaDoc for MessageProducer evens
> mentions you can use a producer without a destination to implement
> request/response:
> "A client also has the option of creating a message producer without
> supplying a destination. In this case, a destination must be provided with
> every send operation. A typical use for this kind of message producer is
> to send replies to requests using the request's JMSReplyTo destination."
> However, I don't see any method that lets me create a MessageProducer
> without associating it with a Destination. The only Session method I see
> is createProducer() and it takes a Destination parameter. So how do I
> create a message Producer that isn't associated with a Destination so I
> can set the Destination on every send?

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message