cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

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

former_member633334
Participant
0 Likes
374

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!

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Likes

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.

former_member633334
Participant
0 Likes

Thanks Johnny, will look into that.