[ https://issues.apache.org/jira/browse/SLING-9017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17020111#comment-17020111 ]
Ashish Chopra edited comment on SLING-9017 at 1/28/20 5:32 AM: --------------------------------------------------------------- bq. 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. -PR for that underway - will update here once ready.- PR: https://github.com/apache/sling-org-apache-sling-distribution-core/pull/33 was (Author: ashishc): bq. 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. ~PR for that underway - will update here once ready.~ PR: https://github.com/apache/sling-org-apache-sling-distribution-core/pull/33 > ErrorQueueDispatchingStrategy ends up using an incorrect QueueProvider > ---------------------------------------------------------------------- > > Key: SLING-9017 > URL: https://issues.apache.org/jira/browse/SLING-9017 > Project: Sling > Issue Type: Bug > Reporter: Ashish Chopra > Assignee: Timothee Maret > Priority: Major > Time Spent: 10m > 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)