activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiram Chirino (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (APLO-100) Support a `include-seq` and `from-seq` option on the `SUBSCRIBE` frame to finely control from where in a queue a subscription starts from.
Date Mon, 05 Dec 2011 23:28:41 GMT
Support a `include-seq` and `from-seq` option on the `SUBSCRIBE` frame to finely control from
where in a queue a subscription starts from.
------------------------------------------------------------------------------------------------------------------------------------------

                 Key: APLO-100
                 URL: https://issues.apache.org/jira/browse/APLO-100
             Project: ActiveMQ Apollo
          Issue Type: New Feature
          Components: apollo-broker
            Reporter: Hiram Chirino
            Assignee: Hiram Chirino
             Fix For: 1.0-beta6



As messages are added to a queue in a broker, they are assigned an incrementing
sequence number.  Messages delivered to subscribers can be updated to include
the sequence number if the `include-seq` header is added to the `SUBSCRIBE`
frame.  This header should be set to a header name which will be added
messages delivered to hold value of the sequence number.

Example:

    SUBSCRIBE
    id:mysub
    destination:/queue/foo
    include-seq:seq
    
    ^@

Then you can expect to receive messages like:

    MESSAGE
    subscription:mysub
    destination:/queue/foo
    seq:1
    
    Hello
    ^@
    MESSAGE
    subscription:mysub
    destination:/queue/foo
    seq:2
    
    World
    ^@

Furthermore, you configure the `SUBSCRIBE` frame so that the subscription
only receives messages that have a sequence id that is equal to or greater 
than a requested value by using the `from-seq` header.  Example:

    SUBSCRIBE
    id:mysub
    destination:/queue/foo
    from-seq:10
    
    ^@

If the `from-seq` is set to `-1`, then the subscription will receive messages
from the tail of the queue.  In other words, it will only receive new messages sent 
to the queue.

Note: You can only use the `from-seq` header with normal destinations.  If you 
attempt to use it with a wildcard or composite destination then the connection
will be closed due to invalid usage.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message