jms-spec
  1. jms-spec
  2. JMS_SPEC-141

Allow async delivery to temporary destinations in Java EE

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Labels:
      None

      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.

        Activity

        Hide
        lprimak added a comment -

        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

        Show
        lprimak added a comment - 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

          People

          • Assignee:
            Unassigned
            Reporter:
            Nigel Deakin
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: