sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashish Chopra (Jira)" <j...@apache.org>
Subject [jira] [Created] (SLING-9017) ErrorQueueDispatchingStrategy ends up using an incorrect QueueProvider
Date Tue, 21 Jan 2020 10:07:00 GMT
Ashish Chopra created SLING-9017:
------------------------------------

             Summary: 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


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)

Mime
View raw message