質問

i am new to activemq. when i create a consumer for temporary queue the consumer give a point to temporary queue that was created in the session.it will be a synchronize process.after that it will produce the message to broker(activemq).the code follows

// client side
 Destination tempDest = session.createTemporaryQueue();
 MessageConsumer responseConsumer = session.createConsumer(tempDest);

...

// send a request..
message.setJMSReplyTo(tempDest)
message.setJMSCorrelationID(myCorrelationID);

producer.send(message);

i want to know whether i can create a consumer for the Temporary Queue in different connection or session ?if i can then how to consume the Temporary Queue with its name in different session or connection ?

役に立ちましたか?

解決

As you probably already read here (where you copied the example from), temporary queues are created per request. That means they are not designed to be used in another session or connection.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top