On Premises Messaging

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

Pattern Definition

Problem How do I send messages between on-premises producers and Cloud-based based consumers, or vice versa, using an on-premises messaging platform?
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. Cloud to Cloud messaging is also supported. The Messaging Platform is on premises.
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.
  • Limited need for Cloud to Cloud messaging.
  • The Cloud-based producer or consumer can be SaaS, PaaS, or IaaS
  • There is a desire to have the Messaging Platform on premises.
Solution An on-premises 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 using existing on-premises Messaging Platform.
  • Only one Messaging Platform to manage.
Cons:
  • Probably not a good solution if Cloud-to-Cloud messaging is common.
  • Requires public cloud access to the on-premises messaging platform

Interaction View


Point-to-Point Pull

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

Interaction

Message transmitted from on premises to Cloud:

  1. On-premises message producer posts a message to the on-premises Messaging Platform.
  2. The Cloud-based messaged consumer polls the on-premises 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 on-premises Messaging Platform. The producer may be SaaS, PaaS, or IaaS software.
  2. The on-premises message consumer polls the on-premises Messaging Platform for the message.

Notes

  1. The Messaging Platform must allow calls 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.

Point-to-Point Push

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

Interaction

Message transmitted from on premises to Cloud:

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

Message transmitted from Cloud to on premises:

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

Notes

  1. The Messaging Platform must allow calls 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

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

Interaction

Message transmitted from Cloud to on premises and vice versa:

  1. The Cloud-based and on-premises message consumers register listeners for receiving messages from the on-premises 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 on-premises Messaging Platform. 
  3. The on-premises Messaging Platform pushes the message to the Cloud-based consumer and the on-premises consumer using the listener 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. The Messaging Platform must allow calls from the public Cloud.
  2. This interaction shows message consumers receiving a published message by both polling and pushing.
  3. This interaction shows two consumers on premises and in the Cloud, but there could be any number of consumers.
  4. 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).
  5. 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

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

Interaction

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 on-premises Messaging Platform. 
  3. The on-premises message responder retrieves a message from the Request Queue on the on-premises Messaging Platform.

Message transmitted from on premises to Cloud:

  1. The on-premises message responder posts a message to the Response Queue on the on-premises Messaging Platform.
  2. The on-premises message responder commits the transaction with the on-premises 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 on-premises Messaging Platform. The consumer may be SaaS, PaaS, or IaaS software.

Notes

  1. The Messaging Platform must allow calls from the public Cloud.
  2. This interaction shows the consumer receiving the messages via polling, but the consumer could alternatively register a listener and receive message via push.
  3. The locations could be reversed i.e. the responder could be cloud based and the producer and consumer could be on premises.
  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.

Cloud to Cloud Pull

Point-to-point messaging between Clouds with message pull by consumer.

Interaction

Message transmitted from Cloud to Cloud:

  1. The Cloud-based message producer posts a message to the on-premises Messaging Platform.
  2. The Cloud-based messaged consumer polls the on-premises 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. The Messaging Platform must allow calls from the public Cloud.
  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.

Cloud to Cloud Push

Point-to-point messaging between Clouds with message push to the consumer.

Interaction

Message transmitted from Cloud to Cloud:

  1. The Cloud-based messaged consumer registers a listener 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 the on-premises Messaging Platform. 
  3. The Cloud-based Messaging Platform pushes the message to the Cloud-based consumer using the listener the consumer registered.

Notes

  1. The Messaging Platform must allow calls 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

Transacted Request-Response for Cloud

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


Interaction

Message transmitted from Cloud to 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 on-premises Messaging Platform. 
  3. The Cloud-based message responder retrieves a message from the Request Queue on the on-premises Messaging Platform.
  4. The Cloud-based message responder posts a message to the Response Queue on the on-premises Messaging Platform.
  5. The Cloud-based message responder commits the transaction with the on-premises 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.
  6. The Cloud-based messaged consumer retrieves the message from the Response Queue of the on-premises Messaging Platform. The consumer may be SaaS, PaaS, or IaaS software.

Notes

  1. The Messaging Platform must allow calls 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.