Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-9017

ErrorQueueDispatchingStrategy ends up using an incorrect QueueProvider

    XMLWordPrintableJSON

Details

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ashishc Ashish Chopra
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h