Core Concepts

Message Queues and Messages are used by Platform to store, transmit and process data feeds.

images/download/attachments/144835977/p2pi_overview-version-1-modificationdate-1645136298000-api-v2.png

A Message Queue is a container that can hold Messages. Messages are ordered within a Message Queue using a First-in-first-out metaphor; the first Message enqueued will be the first Message dequeued. In the figure above, we see a Platform instance with two Message Queues: one named inbox/Orders and another named outbox/Orders/errors. Each Queue contains three Messages.

By the Queues' names, we can infer that one is a place for clients to enqueue their data (inbox/Orders), and the other is intended for clients to dequeue responses (outbox/Orders/errors). Each Queue is classified as an Inbox, Outbox, or one of a few other available categories; what happens to the Message when it is dequeued will vary based on this property.

A Message is a piece of data that is published to a Message Queue. It includes meta-data which describes the Message, including a unique identifier, creation date, reference to a related message, etc. The Message also includes a payload containing the "real data" associated with the message. For example, the payload for a message to inbox/Orders might be a CSV file containing 100 orders.

Here are some examples of the ways that Messages can be enqueued and dequeued:

images/download/attachments/144835977/enqueue_dequeue-version-1-modificationdate-1645136306000-api-v2.png


  • Internal APIs are available for enqueuing/dequeuing directly from application code. Note that this participates in local database transactions so the enqueue/dequeue is atomic with the current business operation

  • Messages can be enqueued via an authenticated, RESTful HTTP call. (This is how one Platform instance integrates messages to another in "P2PI".) Similarly, a router can be used to dequeue a message and submit it via HTTP to another system.

  • Given directories and file naming patterns, Platform can poll a directory and enqueue messages based on those files. Similarly, it can dequeue messages to file as well.

Typically, Messages will be associated with an Inbound Interface and/or Outbound Interface. In this context, an Interface defines a data format to which the payload of the message adheres. Inbound Interfaces define the required data format in order for Platform to process the message, and Outbound Interfaces define the format a client can expect when consuming a particular Outbound message. Inbound and Outbound Interfaces are defined in Studio in the Process Type editor (see the figure below).

images/download/attachments/144835977/integ_interfaces-version-1-modificationdate-1645136314000-api-v2.jpg

images/download/attachments/144835977/interfaceDef-version-1-modificationdate-1645136329000-api-v2.jpg