[ 
https://issues.apache.org/jira/browse/SLING-9389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17089433#comment-17089433
 ] 

Harsh Chiki commented on SLING-9389:
------------------------------------

[~marett], we request you to have a look at the proposed improvement. 

We request your inputs on the requirement as posted and what technical points 
we need to be careful about.

 

Following are the initial pointers we have (we are working on refining them 
further)
 * Queue item creation: 
[https://github.com/apache/sling-org-apache-sling-distribution-core/blob/429f6bc225970c34e948d0ad41c38fe4c0ef9ef9/src/main/java/org/apache/sling/distribution/queue/impl/resource/ResourceQueueUtils.java#L219]
 * Queue Processing where DISTRIBUTION/DROPPED events are fired - 
[https://github.com/apache/sling-org-apache-sling-distribution-core/blob/master/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentQueueProcessor.java#L115-L169]
 * Add details to the distribution event here - 
[https://github.com/apache/sling-org-apache-sling-distribution-core/blob/a1850193d63ddedced4ad982df18a62345cdf41b/src/main/java/org/apache/sling/distribution/event/impl/DefaultDistributionEventFactory.java#L52-L70]
 ** DistributionEventFactory - and internal interface in SCD Core - 
[https://github.com/apache/sling-org-apache-sling-distribution-core/blob/429f6bc225970c34e948d0ad41c38fe4c0ef9ef9/src/main/java/org/apache/sling/distribution/event/impl/DistributionEventFactory.java#L28]
 ** DistributionEventFactoryImpl - internal to SCD Core - 
[https://github.com/apache/sling-org-apache-sling-distribution-core/blob/a1850193d63ddedced4ad982df18a62345cdf41b/src/main/java/org/apache/sling/distribution/event/impl/DefaultDistributionEventFactory.java#L52-L70]
 *** DistributionEventFactoryImpl though uses DistributionEventProperties 
"exported" by SCD api, where we will need to add a new property for queue 
creation time - 
[https://github.com/apache/sling-org-apache-sling-distribution-api/blob/master/src/main/java/org/apache/sling/distribution/event/DistributionEventProperties.java#L28]

 

\cc: [~ashishc], [[email protected]]

> Distribution Event Packages should contain queue item creation time
> -------------------------------------------------------------------
>
>                 Key: SLING-9389
>                 URL: https://issues.apache.org/jira/browse/SLING-9389
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Harsh Chiki
>            Priority: Major
>
> Currently the Dsitribution Event package contains the following details:
>  * Distribution Component Name
>  * Distribution Component Kind
>  * Distribution Type
>  * Distribution Paths
>  
> Improvement aims at adding the queue item creation time, essentially when the 
> the item was creation for the first time, and enqueue into the queue. The 
> value does not change over retries (on failure).
>  
> The purpose to get this detail is to be able to capture metrics at the 
> consumer level. The consumers could have an event handler, which can capture 
> the duration which turns out to be (NOW - queue item creation time thrown in 
> the distribution event package); NOW being the current time in the event 
> handler (consumer).
>  
> \cc: [[email protected]], [~ashishc]



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

Reply via email to