[ 
https://issues.apache.org/jira/browse/SLING-10154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Schneider updated SLING-10154:
----------------------------------------
    Description: 
The offset of a message is only valid in the context of a messaging system (by 
url) and topic name. So we must key the offsets we store by these two 
identifiers.
We can create the new URL(messagingUrl).getHost() + "#" + 
JcrUtil.escapeIllegalJcrChars(topicName)_._

We then store the processed package offset by this key instead of the old 
"package" identifier.

When the env is new or we switch to a not yet used key there is no stored 
offset. In this case we should get the latest offset of the topic and assign to 
it. This way we avoid reprocessing of all messages. Additionally this can be 
used to reset the offset by removing the stored key path from the repository 
and restart the publish farm.

After the restart the offset would be repopulated with the latest offset. This 
would reset the queues.

 Additionally we change the precondition code to skip packages earlier than the 
earliest confirmed package offset. This way we avoid that publish hangs waiting 
on a status it can never reveive as golden publish started with a higher latest 
offset.

To reset offsets a JMX bean is provided to allow to reset the local stores.

> Allow to seamlessly move clients to different set of topics
> -----------------------------------------------------------
>
>                 Key: SLING-10154
>                 URL: https://issues.apache.org/jira/browse/SLING-10154
>             Project: Sling
>          Issue Type: Improvement
>          Components: Content Distribution
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>            Priority: Major
>             Fix For: Content Distribution Journal Core 0.1.18
>
>
> The offset of a message is only valid in the context of a messaging system 
> (by url) and topic name. So we must key the offsets we store by these two 
> identifiers.
> We can create the new URL(messagingUrl).getHost() + "#" + 
> JcrUtil.escapeIllegalJcrChars(topicName)_._
> We then store the processed package offset by this key instead of the old 
> "package" identifier.
> When the env is new or we switch to a not yet used key there is no stored 
> offset. In this case we should get the latest offset of the topic and assign 
> to it. This way we avoid reprocessing of all messages. Additionally this can 
> be used to reset the offset by removing the stored key path from the 
> repository and restart the publish farm.
> After the restart the offset would be repopulated with the latest offset. 
> This would reset the queues.
>  Additionally we change the precondition code to skip packages earlier than 
> the earliest confirmed package offset. This way we avoid that publish hangs 
> waiting on a status it can never reveive as golden publish started with a 
> higher latest offset.
> To reset offsets a JMX bean is provided to allow to reset the local stores.



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

Reply via email to