Cloud Messaging

Messaging between producers and consumers (on-premise and Cloud based) with a Cloud-based messaging platform.

Pattern Definition

Problem How do I send messages between message producers and messaged consumers, minimal on premise impacts?
Context This pattern is applicable when a message needs to be sent from an on-premises producer to a cloud-based consumer, or vice versa, from a cloud-based producer to an on-premises consumer. This pattern also supports Cloud to Cloud and on premises to on premises messaging. The Messaging Platform is cloud-based.
Forces
  • An on-premises producer needs to send a message to a Cloud based consumer.
  • A Cloud-based producer needs to send a message to an on-premises consumer.
  • Cloud to Cloud messaging is needed
  • The Cloud-based producer or consumer can be Saas, PaaS, or IaaS.
  • There is a desire to have the Messaging Platform Cloud-based.
Solution A Cloud-based Messaging Platform facilitates messaging between on-premises producers and Cloud-based consumers, Cloud-based producers and on-premises consumers, Cloud-based produces and consumers, and on-premises producers and consumers.
ConsequencesPros:
  • Provides the quickest messaging approach.
  • Only one Messaging Platform to manage.
Cons:
  • Probably not a good solution if on premises to on premises messaging is common.
  • Limits the options for connecting to the on-premises publishers and consumers.
  • No support for synchronous request-response.

Interaction Views


Point to Point Pull

Point-to-point messaging between Cloud and on premises with message pull by consumer. 

Interactions

Message transmitted from on premises to Cloud:

  1. On-premises message producer posts a message to the Messaging Platform.
  2. The Cloud-based messaged consumer polls the Messaging Platform for the message. The consumer may be SaaS, PaaS, or IaaS software.

Message transmitted from Cloud to on premises:

  1. The Cloud-based producer posts a message to the Messaging Platform. The producer may be SaaS, PaaS, or IaaS software.
  2. The on-premises message consumer polls the Messaging Platform for the message.

Notes

  1. This pull interaction allows the consumer to check for messages when it is ready to handle the message.
  2. By polling, the on-premises consumer does not need to allow incoming connections.
  3. This interaction does not include the set-up calls to the Messaging Platform to create messaging contexts, sessions, connections, queues, etc., used by the producers and consumers.

Point to Point Push

Point-to-point messaging between Cloud and on-premises with message push to the consumer.

Interactions

Message transmitted from on premises to Cloud:

  1. The Cloud-based messaged consumer registers a call-back URL for receiving messages from the Messaging Platform. The consumer may be SaaS, PaaS, or IaaS application.
  2. On-premises message producer posts a message to the Messaging Platform.
  3. The Messaging Platform pushes the message to the Cloud-based consumer using the call-back URL the consumer registered.

Message transmitted from Cloud to on premises:

  1. The on-premises message consumer registers a call-back URL for receiving messages from the Messaging Platform.
  2. The Cloud-based producer posts a message to the Messaging Platform. The producer may be SaaS, PaaS, or IaaS application
  3. The Messaging platform pushes the message to the on-premises consumer using the call-back URL the consumer registered.

Notes

  1. The on-premises message consumer must expose a URL that can be called from the public cloud.
  2. Message push eliminates the need for the message consumer to poll for messages.
  3. This interaction does not include the set-up calls to the Messaging Platform to create messaging contexts, sessions, connections, queues, etc., used by the producers and consumers

Publish-Subscribe Pull/Push

Publish and subscribe messaging between Cloud and on premises using either message pull by consumer or message push to consumer.

Interactions

Message transmitted from Cloud to on premises and vice versa:

  1. The Cloud-based and on-premises message consumers register call-back URLs for receiving messages from the Messaging Platform. The consumer may be SaaS, PaaS, or IaaS software.
  2. The Cloud-based or on-premises message producer posts a message to a topic in the Messaging Platform.
  3. The Messaging Platform pushes the message to the Cloud-based consumer and the on-premises consumer using the call-back URL that each consumer registered.
  4. The Cloud-based message consumer and the on-premises message consumer each poll the Messaging Platform for the message.

Notes

  1. This interaction shows message consumers receiving a published message by both polling and pushing.
  2. This interaction shows two consumers on premises and in the Cloud, but there could be any number of consumers.
  3. Consumers can also register durable subscriptions so that messages are retained in the topic until the consumer receives the message (by either push or pull).
  4. This interaction does not include the set-up calls to the Messaging Platform to create messaging contexts, sessions, connections, queues, etc., used by the producers and consumers.

Transacted Point to Point Pull

Point-to-point messaging using transactions to ensure all or none delivery of messages. 

Interactions

Message transmitted from on premises to Cloud:

  1. The on-premises message producer starts a transaction with the Messaging Platform.
  2. The on-premises message producer posts a message to Queue A on the Messaging Platform.
  3. The on-premises message producer posts a message to Queue B on the Messaging Platform.
  4. The on-premises message producer commits the transaction with the Messaging Platform. The messages posted to Queue A and Queue B are now available for retrieval by message consumers.
  5. The Cloud-based message consumer retrieves the message from Queue A. The consumer may be SaaS, PaaS, or IaaS software.
  6. The Cloud-based message consumer retrieves the message from Queue B. The consumer may be SaaS, PaaS, or IaaS software.

Message transmitted from Cloud to on premises:

  1. 8.9.10.11.12. Interaction illustrates the same as above except that the producer (SaaS, PaaS, or IaaS software) is Cloud-based and the consumers are on premises.

Notes

  • This interaction shows the consumers receiving the messages via polling, but the consumers could alternatively register a call-back URL and receive messages via push.
  • This interaction does not include the set-up calls to the Messaging Platform to create messaging contexts, sessions, connections, queues, etc., used by the producers and consumers.

Transacted Request-Response Pull

Request-response messaging using transactions to ensure request/response pairing. 

Interactions

Message transmitted from Cloud to on premises:

  1. The Cloud-based producer posts a message to the Messaging Platform. The producer may be SaaS, PaaS, or IaaS software.
  2. The on-premises message responder starts a transaction with the Messaging platform.
  3. The on-premises message responder retrieves a message from the Request Queue on the Messaging platform.

Message transmitted from on premises to Cloud:

  1. The on-premises message responder posts a message to the Response Queue on the Messaging platform.
  2. The on-premises message responder commits the transaction with the Messaging platform. At this point, the message in the Request Queue is removed and the message in the Response Queue is available for retrieval by message consumers.
  3. The Cloud-based messaged consumer retrieves the message from the Response Queue of the Messaging platform. The consumer may be SaaS, PaaS, or IaaS software.

Notes

  1. This interaction shows the consumer receiving the messages via polling, but the consumer could alternatively register a call-back URL and receive message via push.
  2. This interaction does not include the set-up calls to the Messaging Platform to create messaging contexts, sessions, connections, queues, etc., used by the producers and consumers.

Cloud to Cloud Pull

Point-to-point messaging between Cloud-based producers and consumers using message pull by the consumer. 

Interactions

Message transmitted left side Cloud to right side Cloud:

  1. Cloud-based message producer posts a message to the Messaging platform. The producer may be SaaS, PaaS, or IaaS software.
  2. The Cloud-based messaged consumer polls the Messaging platform for the message. The consumer may be SaaS, PaaS, or IaaS software.

Notes

  1. This pull interaction allows the consumer to check for messages when it is ready to handle the message.
  2. This interaction does not include the set-up calls to the Messaging platform to create messaging contexts, sessions, connections, queues, etc., used by the producers and consumers.

Cloud to Cloud Push

For Point-to-point messaging between Cloud-based producers and consumers with message push to the consumer. 

Interactions

Message transmitted left side Cloud to right side Cloud:

  1. The Cloud-based messaged consumer registers a call-back URL for receiving messages from the Messaging platform. The consumer may be SaaS, PaaS, or IaaS software. 
  2. Cloud-based message producer posts a message to the Messaging platform.
  3. The Messaging platform pushes the message to the Cloud-based consumer using the call-back URL the consumer registered.

Notes

  1. Message push eliminates the need for the message consumer to poll for messages.
  2. This interaction does not include the set-up calls to the Messaging platform to create messaging contexts, sessions, connections, queues, etc., used by the producers and consumers.

Many to Many Pull for Cloud

Many-to-many messaging between Cloud-based producers and consumers with message pull by the consumers. 

Interactions

Messages transmitted left side Cloud to right side Cloud:

  1. Multiple Cloud-based message producers post messages to a queue in the Messaging platform. These producers may be SaaS, PaaS, or IaaS software.
  2. Multiple Cloud-based messaged consumers pull messages from one queue in the Messaging platform. The consumers may be SaaS, PaaS, or IaaS software

Notes

  1. This pull interaction allows the consumers to check for messages when ready to handle the message.
  2. This interaction enables a pool of consumers to handle messages from a pool of message producers. Three producers and two consumers are shown, but there could be any number of producers and consumers.
  3. This interaction does not include the set-up calls to the Messaging platform to create messaging contexts, sessions, connections, queues, etc., used by the producers and consumers.

Publish-Subscribe for Pull/Push for Cloud

Publish and subscribe messaging between Cloud-based producers and consumers using either message pull by consumer or message push to consumer

Interactions

Messages transmitted left side Cloud to right side Cloud:

  1. One of the Cloud-based message consumers register a call-back URL for receiving messages from the Messaging platform. The consumer may be SaaS, PaaS, or IaaS software.
  2. The Cloud-based message producer posts a message to a topic in the Messaging platform.
  3. The Messaging platform pushes the message to the Cloud-based consumer that registered a call-back URL.
  4. The other Cloud-based message consumer polls the Messaging platform for the message

Notes

  • This interaction shows message consumers receiving a published message by both polling and pushing.
  • This interaction shows two consumers, but there could be any number of consumers.
  • Consumers can also register durable subscriptions so that messages are retained in the topic until the consumer receives the message (by either push or pull).
  • This interaction does not include the set-up calls to the Messaging platform to create messaging contexts, sessions, connections, queues, etc., used by the producers and consumers.

Transacted Point to Point Pull for Cloud

Point-to-point messaging using transactions to ensure all or none delivery of messages.

Interactions

Messages transmitted left side Cloud to right side Cloud:

  1. The Cloud-based message producer starts a transaction with the Messaging platform. The consumer may be SaaS, PaaS, or IaaS software.
  2. The Cloud-based message producer posts a message to Queue A on the Messaging platform.
  3. The Cloud-based message producer posts a message to Queue B on the Messaging platform.
  4. The Cloud-based message producer commits the transaction with the Messaging platform. The messages posted to Queue A and Queue B are now available for retrieval by message consumers.
  5. The Cloud-based message consumer retrieves the message from Queue A. The consumer may be SaaS, PaaS, or IaaS software.
  6. The Cloud-based message consumer retrieves the message from Queue B. The consumer may be SaaS, PaaS, or IaaS software.

Notes

  1. This interaction shows the consumers receiving the messages via polling, but the consumers could alternatively register a call-back URL and receive messages via push.
  2. This interaction does not include the set-up calls to the Messaging platform to create messaging contexts, sessions, connections, queues, etc., used by the producers and consumers.

Transacted Request-Response Pull for Cloud

Request-response messaging using transactions to ensure request/response pairing.

Interactions

Message transmitted left side Cloud to right side Cloud:

  1. The Cloud-based producer posts a message to the Messaging platform. The producer may be SaaS, PaaS, or IaaS software.
  2. The Cloud-based message responder starts a transaction with the Messaging platform. The responder may be SaaS, PaaS, or IaaS software.
  3. The Cloud-based message responder retrieves a message from the Request Queue on the Messaging platform.

Message transmitted right side Cloud to left side Cloud:

  1. The Cloud-based message responder posts a message to the Response Queue on the Messaging platform.
  2. The Cloud-based message responder commits the transaction with the Messaging platform. At this point, the message in the Request Queue is removed and the message in the Response Queue is available for retrieval by message consumers.
  3. The Cloud-based messaged consumer retrieves the message from the Response Queue of the Messaging platform. The consumer may be SaaS, PaaS, or IaaS software.

Notes

  1. This interaction shows the consumer receiving the messages via polling, but the consumer could alternatively register a call-back URL and receive message via push.
  2. This interaction does not include the set-up calls to the Messaging platform to create messaging contexts, sessions, connections, queues, etc., used by the producers and consumers.