In JMS, a topic implements publish and subscribe semantics. When you publish a message it goes to all the subscribers who are interested - so zero to many subscribers will receive a copy of the message. Only subscribers who had an active subscription at the time the broker receives the message will get a copy of the message.
The default JMS provider for YOUnite MDM is Apache ActiveMQ (AMQ). Subscribers (e.g. the YOUnite UI) use the STOMP protocol to register listeners.
Notification Flow
This notification flow describes the interaction between the core YOUnite MDM service, the JMS service and client that subscribe to YOUnite MDM events (e.g. the YOUnite UI). This notification flow is separate from the YOUnite MDM Router/Adaptor flow that will be published in a separate document.
MDM Notification Types and Payloads
This document describes the current MDM service event notification types and their payloads.
Adding Notification Types to MDM
More notification types will need to be added as features are added to MDM. The process is broken down into the following steps:
- Add the new notification topic name to the
topic
enum in: open-mdm/src/main/resources/raml/schemas/topicPref.json. This is a RAML file so the source needs to be built for the change to take effect. - Typically the topic is generated at the resource layer (e.g.
impl.resource/DomainsResource.java
) after the service layer has successfully completed the event.- <MAYANK - Why is createEvent() commented>
The scope of delivery for an event type can be targeted for a set of subscribers. These are defined in
api/generated/model/NotificationPreferences.java
Targeted Subscribers Description SELF Subscribers that belong to the zone that generated the event.
CHILDREN Subscribers that belong to the zone that generated the event and children of that zone.
ALL All zones
Subscribing to Topics
Clients such as the YOUnite UI require real time updates of MDM events.
<Waiting on snippet>