Purpose
The purpose of this document is to record the functionality the Message Broker needs to provide to the Router/API application in MDM.
Requirements
The functionality that the Router requires from the Message Broker is relatively straightforward and is typical of most Message Bus systems.
From the Router’s standpoint, the Message Bus is the way the Router communicates with the Adaptors. There will be one queue set up for each adaptor for incoming messages from the Router. This queue will be used for state and data messages. There will also be a queue for data and a queue for state that each adaptor can put messages on to be received by the Router.
There will also be a Topic that all adaptors would subscribe to and that messages could be broadcast on for the Router to post messages on.
As one set of queues will be used by the router to maintain adaptor state, one of the states is to effectively “pause” the adaptor from processing data messages. In order to achieve this, the MB will need to support 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 messages have been queued up and are awaiting processing.
So, to summarize the Router will need the following:
Be able to connect to the Message Broker and reestablish all connections (i.e. resume listeners) to durable but dynamically defined queues.
Create durable queues for each adaptor upon creation
Destroy durable queues upon adaptor deletion
Be able to readMessage off a queue
Be able to postMessages to a queue
Be able to postMessage to a topic
Be able to temporarily halt delivery of certain types of messages
Be able to resume delivery of certain types of messages
Be able to inspect a queue (get overall stats--messages in wait, longest wait in queue, etc.)