Details
-
New Feature
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
A normal subscription on a queue will consume messages so that no other
subscription will get a copy of the message. If you want to browse all the
messages on a queue in a non-destructive fashion, you can create browsing
subscription. Browsing subscriptions also works with durable subscriptions
since they are backed by a queue. To make a a browsing subscription, just add the
`browser:true` header to the `SUBSCRIBE` frame. For example:
SUBSCRIBE
id:mysub
browser:true
destination:/queue/foo
^@
Once the broker sends a browsing subscription the last message in the queue,
it will send the subscription a special "end of browse" message to indicate
browsing has completed and that the subscription should not expect any more
messages. The "end of browse" message will have a `browser:end` header set.
Example:
MESSAGE
subscription:mysub
destination:
message-id:
browser:end
^@
If you want the browsing subscription to remain active and continue to
listen for message once the last message on the queue is reached, you
should add the `browser-end:false` header to the `SUBSCRIBE` frame. When
the `browser-end:false` header is added the subscription will not be
sent the "end of browse" message previously described.