Point-to-point messaging By David Boyne

Point-to-point messaging By David Boyne

Point-to-point messaging

Point-to-point channels are used for handling messages between a sender and receiver. The sender puts messages onto the channel and the receiver consumes these messages from the queue (at the rate they want).

Great for scalability

Point-to-point channels can have many concurrent receivers, this is what makes them a powerful for scaling, you can scale your processing of messages from the queue. Having many consumers can also be known as “competing consumers” as described by the enterprise integration patterns book.

Typically, the channel controls which consumer has which message as consumers pull messages from the queue.

Reducing pressure from consumers

You can also see point-to-point messaging being used to release pressure from receivers. Receivers can control the rate of consumption; this is great if you have an API that cannot handle the throughput of messages.

Just one of many patterns

Your event-driven architecture will consist of many different patterns and point-to-point messaging is just one of them. If you want to fan out messages to consumers you need to look at the pub/sub pattern.

Extra resources

  • Understanding Pub/Sub - Visual and resources to help you understand pub/sub pattern.
  • Competing consumers - When using point-to-point messaging you can have many receivers, this is known as competing consumers.
  • EDA Guide - In our EDA guide we also have many more patterns and information to help you dive deeper into EDA.
  • Eventual Consistency - When you have async message processing, the task/process downstream can take time, you need to know how eventual consistency can effect your architecture/application.

Download EDA Visuals

Join over 8,000 others learning EDA and download all the EDA visuals directly to your computer. This document updates everytime a new visual is added so make sure you come back to get the latest.

Download now →
Diagrams and thoughts by @boyney123 to help you learn.