Skip to Content

Data Hub: Event handler based on canonical item publication retry count?

Hello experts,

I need to implement an event handler for PublicationCompletedEvent i.e notify if publication has error. However, I also want to enable Publication Retry so I have datahub.max.publication.retry.count set to a non-zero-value.

Is it possible to handle the event in a way that triggers notification only if the publication is NOT a retry? What I'm trying to say is, is there a way to access the retry count for the specific canonical item, in order to trigger a handler method if the particular publication's retry count is 0? Idea is I don't want to keep sending error notifications for the same item (even if publication retries fail).

Thanks in advance!

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Feb 26, 2018 at 07:07 PM

    You can use the actionId from the PublicationCompletedEvent to find the TargetSystemPublications associated with the PublicationAction. The TargetSystemPublications are associated to TargetSystems. You then can use the TargetSystem id and the CanonicalItem id to find the PublicationRetry to get the retryCount.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.