Message Broker and the YOUnite Router

Purpose

The purpose of this document is to describe the functionality the Message Broker provides to the Router/API application in YOUnite MDM.

Description

The functionality that the YOUnite Router requires from the Message Broker is relatively straightforward and is typical of most Message Bus systems. A Router is a component that is responsible for routing data throughout the ecosystem (and data transfer between adaptors). It is comprised of the Data Record Assembler and ACL Manager.

From the Router’s standpoint, the Message Broker is the way the Router communicates with the Adaptors. The Message Broker encompasses queues.

  • When an adaptor is created, YOUnite creates one queue for it to receive incoming messages from the Router. This queue will be used for state and data messages.
  • Each adaptor will have one queue for data and one queue for state, where it can put messages on to be sent to and received by the Router.
  • All adaptors subscribe to a Topic, which broadcasts messages that are posted there by the Router.

The Router uses one set of queues to maintain adaptor state; one of these states effectively “pauses” the adaptor from processing data messages. In order to achieve this, the Message Broker supports the temporary halting of delivery of certain types of messages. In other words, it’s possible a queue may be put into a “paused_read-only” state where it should not process write messages, but should respond for any read requests for data.

Since an adaptor may be paused, data messages can queue up indefinitely. Hence, it will be highly desirable to be able to get information on the Data Queue for a paused adaptor so a Zone Admin can see how many data messages have queued up and await processing.  

To summarize the Router:

  • Connects to the Message Broker and reestablishes connections (i.e. resumes queue listeners) to durable, dynamically-defined queues

  • Creates data queues for each adaptor upon adaptor creation

  • Destroys data queues upon adaptor deletion

  • Can readMessage off a queue

  • Can postMessages to a queue

  • Can postMessage to a topic

  • Can temporarily halt delivery of certain types of messages

  • Can resume delivery of certain types of messages

  • Can inspect a queue (get overall stats, such as messages in wait, longest wait in queue, etc.)