Asynchronous Messaging
How to enhance your Integration Architecture
Fulvio Tozzo
September 2019
|
A mode of interaction between two or more parties in which the exchange of
information does not require simultaneous active participation.
It is applicable to any scenario where the rate of multiple events exceeds the
ability to process them and the consequences of storing and processing the
events at a later time are low
Definition and Scope
Sep 2019Asynchronous Messaging 3
|
SYNCHRONOUS (Phone)
• Requires participants’ simultaneous
presence
• Times out
• Volatile
• Ignores pace
Synchronous vs Asynchronous Communication
Sep 2019Asynchronous Messaging 4
ASYNCHRONOUS (eMail)
• No “opening hours”
• Perpetual conversation
• Persistent
• Participate at own pace
|
Asynchronous Messaging Pattern
Sep 2019Asynchronous Messaging 5
Publisher
Subscriber
B
Subscriber
A
Channel
Send
Receive
Receive
|
• Divide the publisher and consumer
• Store the messages
• Route messages
• Check and organize messages
Features
Sep 2019Asynchronous Messaging 6
|
Reference Architecture
Sep 2019Asynchronous Messaging 7
External Applications
API
Internal
System 21
Internal
System 22
Internal
System 11
I
Internal Client
Application X
Internal Client
Application Y
Internal Client
Application Z
I
External Client
Application A
External Client
Application B
External Client
Application C
Internal applications and services External Services
External
System 31
External
System 32
Identity provider
Internal
System 12
Integration
Identity provider
Message
Broker
|
Benefits
Sep 2019Asynchronous Messaging 8
Automation
Cost
Effectiveness
Punctuality
Loose
Coupling
Flexibility
Security
Efficiency
Persistence
Reliabilty
|
• An extra layer has to be included in the IT landscape
• Response time might be unpredictable
• The error handling responsibility is shifted from the consumers to the
provider of the service
• Extra storage required to persist the data
Attention Points
XXXX 20XXAsynchronous Messaging 9
|
• Fire & Forget (One-Way)
Message Exchange Patterns
Sep 2019Asynchronous Messaging 10
• Request/Callback
|
Message Distribution
Patterns - Broadcast
Sep 2019Asynchronous Messaging 11
Consumer A Consumer B Consumer C
Producer
Message Broker
|
Message Distribution
Patterns - Broadcast
Sep 2019Asynchronous Messaging 12
Consumer A Consumer B Consumer C
Producer
Input Channel
Output Channel Output Channel Output Channel
Message Broker
|
Message Distribution
Patterns - Broadcast
Sep 2019Asynchronous Messaging 13
Consumer A Consumer B Consumer C
Producer
Input Channel
Output Channel Output Channel Output Channel
Message Broker
|
Scenario – Broadcast an event
Sep 2019Asynchronous Messaging 14
|
Scenario – Broadcast an event
Sep 2019Asynchronous Messaging 15
|
Scenario – Broadcast an event
Sep 2019Asynchronous Messaging 16
|
Message Distribution
Patterns - Direct
Sep 2019Asynchronous Messaging 17
Consumer A Consumer B Consumer C
Producer
Message Broker
|
Message Distribution
Patterns - Direct
Sep 2019Asynchronous Messaging 18
Consumer A Consumer B Consumer C
Producer
Input Channel
Output Channel Output Channel Output Channel
Message Broker
RoutingID =
SubscriberID
|
Message Distribution
Patterns - Direct
Sep 2019Asynchronous Messaging 19
Consumer A Consumer B Consumer C
Producer
Input Channel
Output Channel Output Channel Output Channel
Message Broker
|
Scenario – Data replication
Sep 2019Asynchronous Messaging 20
|
Scenario – Data replication
Sep 2019Asynchronous Messaging 21
|
Scenario – Data replication
Sep 2019Asynchronous Messaging 22
|
Scenario – Data replication
Sep 2019Asynchronous Messaging 23
|
Message Distribution
Patterns - Routing
Sep 2019Asynchronous Messaging 24
Consumer A Consumer B Consumer C
Producer
Message Broker
|
Message Distribution
Patterns - Routing
Sep 2019Asynchronous Messaging 25
Consumer A Consumer B Consumer C
Producer
Input Channel
Output Channel Output Channel Output Channel
MyID =
SubscriberID
Message Broker
|
Message Distribution
Patterns - Routing
Sep 2019Asynchronous Messaging 26
Consumer A Consumer B Consumer C
Producer
Input Channel
Output Channel Output Channel Output Channel
Message Broker
|
Scenario – Ordered workflow
Sep 2019Asynchronous Messaging 27
|
Scenario – Ordered workflow
Sep 2019Asynchronous Messaging 28
|
Scenario – Ordered workflow
Sep 2019Asynchronous Messaging 29
|
Scenario – Ordered workflow
Sep 2019Asynchronous Messaging 30
|
Scenario – Ordered workflow
Sep 2019Asynchronous Messaging 31
|
Scenario – Ordered workflow
Sep 2019Asynchronous Messaging 32
|
Message Distribution
Patterns -
Publish/Subscribe
Sep 2019Asynchronous Messaging 33
Consumer A Consumer B Consumer C
Producer
Message Broker
|
Message Distribution
Patterns -
Publish/Subscribe
Sep 2019Asynchronous Messaging 34
Consumer A Consumer B Consumer C
Producer
Input Channel
Output Channel Output Channel
Message Broker
|
Message Distribution
Patterns -
Publish/Subscribe
Sep 2019Asynchronous Messaging 35
Consumer A Consumer B Consumer C
Producer
Input Channel
Output Channel Output Channel
Message Broker
SubscriberID =
RoutingID
SubscriberID =
RoutingID
|
Scenario – Update event
Sep 2019Asynchronous Messaging 36
|
Scenario – Update event
Sep 2019Asynchronous Messaging 37
|
Scenario – Update event
Sep 2019Asynchronous Messaging 38
|
• Standard messaging API for JAVA platform
• Defines the message format (headers,
properties and body)
• Interoperability is only within Java and JVM
languages
• Does not worry about the wire level protocol
• Supports two messaging models with
queues and topics
• Supports transactions
JMS – Java Message Service
Sep 2019Asynchronous Messaging 39
|
• It is a platform independent wire level
messaging protocol
• Interoperable across multiple languages
and platforms
• Has four exchange types: direct, fanout,
topic, headers
• Supports transactions
• Meta-data allows to control the message
flow
• OASIS Standard
• AMQP 0.9 and 1.0 are completely different
AMQP – Advanced Message Queuing Protocol
Sep 2019Asynchronous Messaging 40
|
• Designed to be used for small dumb
devices sending small messages over
low bandwidth networks
• No long living store
• Supports publish-subscribe for topics
• Does not allow fragmented messages
(hard to send large messages)
• No transactional support (only basic
acknowledgements)
• OASIS Standard
MQTT – Message Queuing Telemetry Transport
Sep 2019Asynchronous Messaging 41

SmartTechTalk : Asynchronous messaging

  • 2.
    Asynchronous Messaging How toenhance your Integration Architecture Fulvio Tozzo September 2019
  • 3.
    | A mode ofinteraction between two or more parties in which the exchange of information does not require simultaneous active participation. It is applicable to any scenario where the rate of multiple events exceeds the ability to process them and the consequences of storing and processing the events at a later time are low Definition and Scope Sep 2019Asynchronous Messaging 3
  • 4.
    | SYNCHRONOUS (Phone) • Requiresparticipants’ simultaneous presence • Times out • Volatile • Ignores pace Synchronous vs Asynchronous Communication Sep 2019Asynchronous Messaging 4 ASYNCHRONOUS (eMail) • No “opening hours” • Perpetual conversation • Persistent • Participate at own pace
  • 5.
    | Asynchronous Messaging Pattern Sep2019Asynchronous Messaging 5 Publisher Subscriber B Subscriber A Channel Send Receive Receive
  • 6.
    | • Divide thepublisher and consumer • Store the messages • Route messages • Check and organize messages Features Sep 2019Asynchronous Messaging 6
  • 7.
    | Reference Architecture Sep 2019AsynchronousMessaging 7 External Applications API Internal System 21 Internal System 22 Internal System 11 I Internal Client Application X Internal Client Application Y Internal Client Application Z I External Client Application A External Client Application B External Client Application C Internal applications and services External Services External System 31 External System 32 Identity provider Internal System 12 Integration Identity provider Message Broker
  • 8.
    | Benefits Sep 2019Asynchronous Messaging8 Automation Cost Effectiveness Punctuality Loose Coupling Flexibility Security Efficiency Persistence Reliabilty
  • 9.
    | • An extralayer has to be included in the IT landscape • Response time might be unpredictable • The error handling responsibility is shifted from the consumers to the provider of the service • Extra storage required to persist the data Attention Points XXXX 20XXAsynchronous Messaging 9
  • 10.
    | • Fire &Forget (One-Way) Message Exchange Patterns Sep 2019Asynchronous Messaging 10 • Request/Callback
  • 11.
    | Message Distribution Patterns -Broadcast Sep 2019Asynchronous Messaging 11 Consumer A Consumer B Consumer C Producer Message Broker
  • 12.
    | Message Distribution Patterns -Broadcast Sep 2019Asynchronous Messaging 12 Consumer A Consumer B Consumer C Producer Input Channel Output Channel Output Channel Output Channel Message Broker
  • 13.
    | Message Distribution Patterns -Broadcast Sep 2019Asynchronous Messaging 13 Consumer A Consumer B Consumer C Producer Input Channel Output Channel Output Channel Output Channel Message Broker
  • 14.
    | Scenario – Broadcastan event Sep 2019Asynchronous Messaging 14
  • 15.
    | Scenario – Broadcastan event Sep 2019Asynchronous Messaging 15
  • 16.
    | Scenario – Broadcastan event Sep 2019Asynchronous Messaging 16
  • 17.
    | Message Distribution Patterns -Direct Sep 2019Asynchronous Messaging 17 Consumer A Consumer B Consumer C Producer Message Broker
  • 18.
    | Message Distribution Patterns -Direct Sep 2019Asynchronous Messaging 18 Consumer A Consumer B Consumer C Producer Input Channel Output Channel Output Channel Output Channel Message Broker RoutingID = SubscriberID
  • 19.
    | Message Distribution Patterns -Direct Sep 2019Asynchronous Messaging 19 Consumer A Consumer B Consumer C Producer Input Channel Output Channel Output Channel Output Channel Message Broker
  • 20.
    | Scenario – Datareplication Sep 2019Asynchronous Messaging 20
  • 21.
    | Scenario – Datareplication Sep 2019Asynchronous Messaging 21
  • 22.
    | Scenario – Datareplication Sep 2019Asynchronous Messaging 22
  • 23.
    | Scenario – Datareplication Sep 2019Asynchronous Messaging 23
  • 24.
    | Message Distribution Patterns -Routing Sep 2019Asynchronous Messaging 24 Consumer A Consumer B Consumer C Producer Message Broker
  • 25.
    | Message Distribution Patterns -Routing Sep 2019Asynchronous Messaging 25 Consumer A Consumer B Consumer C Producer Input Channel Output Channel Output Channel Output Channel MyID = SubscriberID Message Broker
  • 26.
    | Message Distribution Patterns -Routing Sep 2019Asynchronous Messaging 26 Consumer A Consumer B Consumer C Producer Input Channel Output Channel Output Channel Output Channel Message Broker
  • 27.
    | Scenario – Orderedworkflow Sep 2019Asynchronous Messaging 27
  • 28.
    | Scenario – Orderedworkflow Sep 2019Asynchronous Messaging 28
  • 29.
    | Scenario – Orderedworkflow Sep 2019Asynchronous Messaging 29
  • 30.
    | Scenario – Orderedworkflow Sep 2019Asynchronous Messaging 30
  • 31.
    | Scenario – Orderedworkflow Sep 2019Asynchronous Messaging 31
  • 32.
    | Scenario – Orderedworkflow Sep 2019Asynchronous Messaging 32
  • 33.
    | Message Distribution Patterns - Publish/Subscribe Sep2019Asynchronous Messaging 33 Consumer A Consumer B Consumer C Producer Message Broker
  • 34.
    | Message Distribution Patterns - Publish/Subscribe Sep2019Asynchronous Messaging 34 Consumer A Consumer B Consumer C Producer Input Channel Output Channel Output Channel Message Broker
  • 35.
    | Message Distribution Patterns - Publish/Subscribe Sep2019Asynchronous Messaging 35 Consumer A Consumer B Consumer C Producer Input Channel Output Channel Output Channel Message Broker SubscriberID = RoutingID SubscriberID = RoutingID
  • 36.
    | Scenario – Updateevent Sep 2019Asynchronous Messaging 36
  • 37.
    | Scenario – Updateevent Sep 2019Asynchronous Messaging 37
  • 38.
    | Scenario – Updateevent Sep 2019Asynchronous Messaging 38
  • 39.
    | • Standard messagingAPI for JAVA platform • Defines the message format (headers, properties and body) • Interoperability is only within Java and JVM languages • Does not worry about the wire level protocol • Supports two messaging models with queues and topics • Supports transactions JMS – Java Message Service Sep 2019Asynchronous Messaging 39
  • 40.
    | • It isa platform independent wire level messaging protocol • Interoperable across multiple languages and platforms • Has four exchange types: direct, fanout, topic, headers • Supports transactions • Meta-data allows to control the message flow • OASIS Standard • AMQP 0.9 and 1.0 are completely different AMQP – Advanced Message Queuing Protocol Sep 2019Asynchronous Messaging 40
  • 41.
    | • Designed tobe used for small dumb devices sending small messages over low bandwidth networks • No long living store • Supports publish-subscribe for topics • Does not allow fragmented messages (hard to send large messages) • No transactional support (only basic acknowledgements) • OASIS Standard MQTT – Message Queuing Telemetry Transport Sep 2019Asynchronous Messaging 41