Lecture 02 Messaging System
Lecture 02 Messaging System
Challenges fo integration
challenges:
> Channels, also known as queues, are logical pathways that connect
the programs and convey messages.
> Send and forget — The sending application sends the message to the
message channel. Once that send is complete, the sender can be
confident that the receiver will eventually receive the message and does
not have to wait until that happens.
> Store and forward — The messaging system stores the message on the
sender's computer. Then, the messaging system delivers the message by
forwarding it to the receiver's computer, and then stores the message once
again on the receiver's computer. This store-and-forward process may be
repeated many times, as the message is moved from one computer to
another, until it reaches the receiver's computer.
Asynchronous messaging model
| Channel
Message (Queue)
Temporal decoupling
Messaging systems
1. Transport messages
2. Design messages
messages
6. Manage and Test the Management Patterns
System
The messaging patterns are basically patterns for each of those categories:
]- Channel patterns describe how messages are transported across a channel.
2- Message construction patterns describe the intent, form and content of the
messages that travel
across the messaging system.
3- Routing patterns discuss how messages are routed from a sender to the correct
receiver. Routing
patterns consume a message from one channel and republish it, Usually without
modification, to
another channel based on a set of conditions.
Messaging system
Data
O
(e) Mi with data
'.
Message Channel
messaging? A a
> Connect the applications using a | | =p
Message Channel, where one rae
application writes information to sci! Messaging Receiver
the channel and the other one petition System Application
reads that information from the
channel.
Message
]- Header - Information used by the messaging system that describes the data being
transmitted, its origin, its destination, and so on.
2- Body - The data being transmitted; generally ignored by the messaging system and
simply transmitted as-is.
Message Translator
Application
Messaging Channels
Message
Endpoint
Receiver
Application
Point-to-Point Channel
Publish-Subscribe Channel
each receiver.
—%
Message that makes no sense? Sender Messages Channel Receiver Invalid Invalid
Message Message
Channel
e « . Delivery Fails
with a message it cannot deliver? a“
>» When a messaging system of Te xX ||
determines that it cannot or
7 P Sender Message Channel Intended
should not deliver a message, it Receiver
may elect fo move the message Reroute Delivery -—=—~~ ®,
to a Dead Letter Channel. =
Dead Dead Letter
Message Channel
Guaranteed Delivery
Disk Disk
Computer 1 Computer 2