users@jms-spec.java.net

[jms-spec users] [jsr343-experts] Re: (JMS_SPEC-43) New API to send a message with async acknowledgement from server

From: Clebert Suconic <clebert.suconic_at_gmail.com>
Date: Wed, 23 May 2012 07:51:37 -0500

> What I mean is: do you see any need for the application thread that called
> send() to block at some later stage whilst it waited for confirmation that
> the acknowledgement had been received?
>
> The application would do this:
>
> 1. Call the async send
> 2. Perform some other work whilst waiting for the send to be completed
> 3. Block until confirmation is received that the send has been completed
>

In most cases I think the user shouldn't ever block, but there are a
few cases where this is necessary (testcases for instance).

The user can easily just use a CountDownLatch on the callback and
block on the wait at the callback.