[
https://issues.apache.org/jira/browse/SLING-9389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17123667#comment-17123667
]
Dirk Rudolph commented on SLING-9389:
-------------------------------------
Hey [~harshchiki], quick question: couldn't you just take the time added to the
DistributionPackageInfo here
https://github.com/apache/sling-org-apache-sling-distribution-core/blob/70214c09f52d9d8fae0e727b572afc82f1d937a9/src/main/java/org/apache/sling/distribution/agent/impl/QueueingDistributionPackageProcessor.java#L119
and expose it DefaultDistributionEventFactory if set?
Though I agree that having the approx. time the distribution request was
created available in the distribution events would make sense. For example when
forwarding the package imported event to a 3rd party system from multiple sling
instances this timestamp could be useful for optimistic locking.
> 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
> Components: Content Distribution
> Reporter: Harsh Chiki
> Assignee: Timothee Maret
> Priority: Major
> Attachments: image-2020-04-30-10-28-58-011.png, scdapi.patch,
> scdcore.patch
>
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> Currently the Distribution 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 MINUS 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)