[
https://issues.apache.org/jira/browse/SLING-9017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Timothee Maret reassigned SLING-9017:
-------------------------------------
Assignee: (was: Timothee Maret)
> ErrorQueueDispatchingStrategy ends up using an incorrect QueueProvider
> ----------------------------------------------------------------------
>
> Key: SLING-9017
> URL: https://issues.apache.org/jira/browse/SLING-9017
> Project: Sling
> Issue Type: Bug
> Components: Content Distribution
> Reporter: Ashish Chopra
> Priority: Major
> Fix For: Content Distribution Core 0.4.8
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Currently, {{ErrorQueueDispatchingStrategy}} [0] interface dictates that the
> {{.add}} [1] method supplies the {{DistributionQueueProvider}} [1] to it.
> For {{ForwardDistributionAgentFactory}} (and perhaps other Agent-factories as
> well), this {{DistributionQueueProvider}} is further used to {{.getQueue}} by
> a name [2].
> As the discussion in SLING-8854 concluded, it was found acceptable [3] for
> {{DistributionQueue}} impls and {{DistributionQueueProvider}} impls to share
> state - concordantly, there needs to be a way for Agent-Factories to dictate
> which _specific_ queue-providers they want {{ErrorQueueDispatchingStrategy}}
> to use.
> One approach to make that happen would be to enhance
> {{ErrorQueueDispatchingStrategy}} with another CTOR to accept a
> {{DistributionQueueProvider}} argument. The impl of {{.add}} can then treat
> the supplied {{DistributionQueueProvider}} at the time of API invocation as a
> 'hint' and ignore it if the {{ErrorQueueDispatchingStrategy}} already has one
> of its own.
> [0]
> https://github.com/apache/sling-org-apache-sling-distribution-core/blob/master/src/main/java/org/apache/sling/distribution/queue/impl/ErrorQueueDispatchingStrategy.java
> [1]
> https://github.com/apache/sling-org-apache-sling-distribution-core/blob/537bb57af821f21537cf4a24ad7d2347c6a5dae1/src/main/java/org/apache/sling/distribution/queue/impl/ErrorQueueDispatchingStrategy.java#L56
> [2]
> https://github.com/apache/sling-org-apache-sling-distribution-core/blob/537bb57af821f21537cf4a24ad7d2347c6a5dae1/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentQueueProcessor.java#L187
> [3]
> https://issues.apache.org/jira/browse/SLING-8854?focusedCommentId=16982396&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16982396
--
This message was sent by Atlassian Jira
(v8.3.4#803005)