Messaging Channels
For more details and full analysis of each pattern described in this section, please refer to Chapter 5 of Reactive Messaging Patterns with the Actor Model by Vaughn Vernon.
- Introduction
- Messaging with Actors
- Messaging Channels
- Message Construction
- Message Routing
- Message Transformation
- Message Endpoints
- System Management and Infrastructure
Point-to-Point Channel
Send the message on a Point-to-Point Channel, which ensures that only one receiver will receive a particular message. The Point-to-Point Channel enables one actor to send messages to another specific actor. When using Akka.NET this is achieved using the actor's reference.
Publish-Subscribe Channel
Send the event on a Publish-Subscribe Channel, which delivers a copy of a particular event to each receiver. This pattern allows actors to publish messages that can be delivered to multiple (subscribed) actors.
Datatype Channel
Use a separate Datatype Channel for each data type, so that all data on a particular channel is of the same type. When actors receive typed messages, they are using a Datatype Channel. In cases when they receive serialized messages, specific actors can be used to create typed ones.
Invalid Message Channel
The receiver should move the improper message to an Invalid Message Channel, a special channel for messages that could not be processed by their receivers. The Invalid Message Channel pattern provides an approach to handle unsupported messages.
Dead Letter Channel
When a messaging system determines that it cannot or should not deliver a message, it may elect to move the message to a Dead Letter Channel. The Dead Letter Channel receives all the messages that didn't reach the desired destination. Any actor can subscribe to the Dead Letter provided by Akka.NET.
Channel Adapter
Use a Channel Adapter that can access the application's API or data and publish messages on a channel based on this data, and that likewise can receive messages and invoke functionality inside the application. This pattern exposes a messaging interface and connects it to the application.
Message Bridge
Use a Message Bridge, a connection between messaging systems, to replicate messages between systems. The Message Bridge pattern integrates two applications using different messaging technologies.
Message Bus
Structure the connecting middleware between these applications as a Message Bus that enables them to work together using messaging. The Message Bus pattern connects different applications in a decoupled fashion.