Chapter 6. Message Construction

In Chapter 4, “Messaging with Actors,” I discussed messaging with actors, but I didn’t cover much about the kinds of messages that should be created and sent. Each message must convey the intent of the sender’s reason to communicate with the receiver. As Enterprise Integration Patterns [EIP] shows, there may be any number of motivations based on the following:

Message intent: Why are you sending a message? Are you requesting another actor to perform an operation? If so, use a Command Message (202). Are you informing one or more other actors that you have performed some operation? In that case, use an Event Message (207). Have you been asked for some large body of information that you must convey to the requester ...

Get Reactive Messaging Patterns with the Actor Model: Applications and Integration in Scala and Akka now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.