EAI Patterns with Actor Model: Return Address

Since you understand how to implement a Request-Reply using Actor Model, what if you want your Request receiver to Reply to an Actor at an Address other than the direct message sender? Well, that’s the idea behind the Return Address pattern, and one that we can implement in a few different ways.

It’s interesting that the Actor Model actually uses Addresses to identify how to send messages to Actors. You see, each Actor has an Address, and in order to send a given Actor a message you must know its Address. One Actor can know the Address of another Actor by a few different means:

  • An Actor creates another Actor, and thus knows the Address of the Actors it has created
  • An Actor receives a message that has the Address of one or more other Actors that it will send messages to
  • In some cases an Actor may be able to look up the Address of another Actor by name, but this may create an unseemly binding to the definition and implementation of a given Actor

Anyway, the Return Address EAI Pattern name fits really well with the fundamental ideas behind Actor Model.

. . .

The full text is now available as part of my book Reactive Enterprise with Actor Model on Safari Books Online.

More to explore

Reactive DDD: Modeling Uncertainty

Domain-Driven Design supports reactive architecture and programming. Still, reactive introduces uncertainty. Back in 2003, the way that Domain-Driven Design was used and

Scroll to Top