jms-spec
  1. jms-spec
  2. JMS_SPEC-43

New API to send a message with async acknowledgement from server

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 2.0ED, 2.0PD, 2.0
    • Labels:
      None

      Description

      This is a proposal for a new API which will send a message and return immediately without blocking until an acknowledgement has been received from the server. Instead, when the acknowledgement is received, an asynchronous callback will be invoked.

      Here is a suggested API:

      There would be a new method on javax.jms.MessageProducer:

      public void setAcknowledgeListener(AcknowledgeListener listener);
      

      This would change the behaviour of any subsequent call to any of the four send methods so that they would return without blocking until an acknowledgement has been received from the server. When the acknowledgement is received, the callback method on the AcknowledgeListener is received.

      This feature will only be available for non-transacted sessions. if setAcknowledgeListener was called on a transacted session then a javax.jms.IllegalStateException would be thrown.

       
      package javax.jms;
      import javax.jms.Message;
      
      public interface AcknowledgeListener {
      	public void onAcknowledge(Message message);
      }
      
      

        Issue Links

          Activity

            People

            • Assignee:
              Nigel Deakin
              Reporter:
              Nigel Deakin
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: