Uploaded image for project: 'ActiveMQ Apollo (Retired)'
  1. ActiveMQ Apollo (Retired)
  2. 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.

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.0-beta6
    • apollo-broker
    • None

    Description

      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.

      Attachments

        Activity

          People

            chirino Hiram R. Chirino
            chirino Hiram R. Chirino
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: