Hi,
Stomp users often want to receive messages in a synchronous fashion; see if there's something in the queue and pick one messages (similar to receive() method in JMS).
Currently they're usually opting for window (prefetch) of 1 and unsubscribe immediately after ack.
What do you guys think of adding a feature like this for Stomp 2.0, to support better these kind of use cases?
The frame could be very similar to SUBSCRIBE one, e.g.
RECEIVE
destination: /queue/foo
ack: client
timeout: 1000
^@
which will cause the broker to send a message if there is one (within timeout) or send NULL (NOOP or whatever) otherwise.
We can even define this behavior for the SUBSCRIBE frame if window 0 is used.