Hi Michel
In general, the purpose of events is to distribute data to downstream systems when you don't really care who the consumers are. The event bus allows you to decouple the message consumers from the producers. It's up to the consumers to decide which queues/topics they subscribe to.
For this to work most effectively, the event should contain all the relevant data, e.g. an entity create event will contain the full entity as payload. That way the consumers don't need to go back to the producer.
Having said that, there may be situations where (e.g. due to size) you would want to limit the contents of the event payload.
------------------------------
Jonathan Goldberg
Amdocs Management Limited
Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
------------------------------
Original Message:
Sent: Jul 21, 2021 08:45
From: Michel Amaral
Subject: TMF-622 - Event handling
Hello,
I have a question on how to identify to which consumer should I send the event when the ProductOrderStateChangeEvent is triggered.
Since there are multiples consumers, and each one has its own Product Orders, and of course I don't want to trigger the callback URL of the consumer A when the Product Order of the consumer B changes its status.
Please, is there anything in the current Event model (TMF-688) that could be used to identify the right consumer? Or should I handle it on my own like extending the standard Event entity?
Thank you very much in advance!
------------------------------
Michel Amaral
------------------------------