[ 
https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318709&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318709
 ]

ASF GitHub Bot logged work on ARTEMIS-2504:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Sep/19 01:33
            Start Date: 26/Sep/19 01:33
    Worklog Time Spent: 10m 
      Work Description: michaelandrepearce commented on pull request #2850: 
ARTEMIS-2504 implement retroactive addresses
URL: https://github.com/apache/activemq-artemis/pull/2850#discussion_r328403475
 
 

 ##########
 File path: docs/user-manual/en/retroactive-addresses.md
 ##########
 @@ -0,0 +1,73 @@
+# Retroactive Addresses
+
+A "retroactive" address is an address that will preserve messages sent to it
+for queues which will be created on it in the future. This can be useful in,
+for example, publish-subscribe use cases where clients want to receive the
+messages sent to the address *before* they they actually connected and created
+their multicast "subscription" queue. Typically messages sent to an address
+before a queue was created on it would simply be unavailable to those queues,
+but with a retroactive address a fixed number of messages can be preserved by
+the broker and automatically copied into queues subsequently created on the
+address. This works for both anycast and multicast queues.
+
+## Internal Retroactive Resources
+
+To implement this functionality the broker will create 3 internal resources for
+each retroactive address:
+
+1. A non-exclusive [divert](#diverts) to grab the messages from the retroactive
+   address.
+2. An address to receive the messages from the divert.
+3. A [ring queue](#ring-queues) to hold the messages sent to the address by the
+   divert. The general caveats for ring queues still apply here. See [the
+   chapter on ring queues](#ring-queues) for more details.
+
+These resources are important to be aware of as they will show up in the web
+console and other management or metric views. They will be named according to
+the following pattern:
+
+```
+<internal-naming-prefix>.<source-address>.(divert|address|queue).retro
+```
+
+For example, if an address named `myAddress` had a `retroactive-message-count`
+of 10 then resources with these names would be created by default:
+
+1. A divert on `myAddress` named `$.artemis.internal.myAddress.divert.retro`
+2. An address named `$.artemis.internal.myAddress.address.retro`
+3. A queue on the address from step #2 named
+   `$.artemis.internal.myAddress.queue.retro` with a `ring-size` of 10.
+
+This pattern is important to note as it allows one to configure 
address-settings
+if necessary.
+
+> Note:
+>
+> Changing the broker's `internal-naming-prefix` once these retroactive
+> resources are created will break the retroactive functionality.
+>
+
+## Configuration
+
+To configure an address to be "retroactive" simply configure the
+`retroactive-message-count` `address-setting` to reflect the number of messages
+you want the broker to preserve, e.g.:
+
+
+```xml
+<address-settings>
+   <address-setting match="orders">
+      <retroactive-message-count>100</retroactive-message-count>
+   </address-setting>
+</address-settings>
+```
+
+The value for `retroactive-message-count` can be updated at runtime either via
 
 Review comment:
   This suggests it updates dynamically. It isnt entirely true as will only 
update the default for new addresses, existing addresses where the retro queue 
is created already it doesnt update. This really is acting as a default value, 
not the explicit. If you needed to change at runtime and existing you would 
need to find the internal queue and update it.
   
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 318709)
    Time Spent: 3h 10m  (was: 3h)

> Support retroactive addresses
> -----------------------------
>
>                 Key: ARTEMIS-2504
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2504
>             Project: ActiveMQ Artemis
>          Issue Type: New Feature
>            Reporter: Justin Graham Bertram
>            Assignee: Justin Graham Bertram
>            Priority: Major
>          Time Spent: 3h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to