Back to Pattern Library
📐 Generalpattern

channel-adapter

Channel Adapter

Summary

A Channel Adapter connects an application to a messaging system, allowing it to send and receive messages without having to be aware of the messaging system's implementation details.

What it is

A Channel Adapter acts as a bridge between an application and a messaging system. It encapsulates the logic required to interact with the messaging system, such as connecting to a message channel, sending messages, and receiving messages.

For sending messages, the adapter calls the application's API to get data, creates a message, and sends it over a channel. For receiving messages, the adapter listens for messages on a channel and invokes functions within the application to process the data.

This pattern is useful for integrating existing applications that were not built to use messaging. By using a Channel Adapter, you can connect almost any application to a messaging infrastructure.