How to handle deletion

Hello,
I have valueentity type service which is called Users and each event journal happened will be also streaming as a topic to other service say it Doctors service. What i want to know is how to set whenever a user is deleted then a doctor will also be hard deleted.
Thank you

Hi @laba

if we are talking about VE and a broker topic, it will be very similar to this example where you can decide explicitly what to do in case of VE deletion. You would need to publish a dedicated message that would inform the consumer about a deleted VE. An ID of deleted entity is present under ce-subject key in the metadata. In case of service-to-service eventing, this is simplified and it’s just a matter of adding the delete handler.

Thanks for your help.