[JMS_SPEC-141] Allow async delivery to temporary destinations in Java EE Created: 18/Nov/13  Updated: 29/Jun/15

Status: Open
Project: jms-spec
Component/s: None
Affects Version/s: 2.0
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Nigel Deakin Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to JMS_SPEC-146 Allow the registration of a message l... Open
Tags: jms21-forreview-major

 Description   

Currently there is no (legal) way for an application running in the Java EE web or EJB containers to consume messages asynchronously from a temporary queue or topic.

The use of setMessageListener to register a MessageListener is not permitted.

It is not possible to configure a MDB to consume messages from a temporary destination.

This was raised in the GlassFish forum recently. https://www.java.net//node/900071 Is this a common requirement?

It is proposed that the discussion elsewhere to make async message delivery in Java EE applications more flexible should (at least) consider this requirement.



 Comments   
Comment by lprimak [ 19/Nov/13 ]

The primary pattern that uses temporary queues and asynchronous receivers is
gathering cluster nodes' health pattern.

  • all nodes broadcast a heartbeat on a topic with a temporary queue as jmsReplyTo
  • all nodes reply to the heartbeat message using getJMSReplyTo() from the heartbeat message (to the temp queue)
  • thus, all nodes will know all other nodes, and will remove stale nodes on heartbeat timeout.

This is the simplest way to implement this pattern.

Another pattern that uses this method is here:
http://www.drdobbs.com/jvm/asynchronous-java-calls-part-2/240003830

Generated at Sun Jan 22 11:19:02 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.