Skip to content

Instantly share code, notes, and snippets.

@jboner
Last active October 9, 2022 21:57
Show Gist options
  • Save jboner/8556813 to your computer and use it in GitHub Desktop.
Save jboner/8556813 to your computer and use it in GitHub Desktop.
How Akka maps to EAI Patterns
# How Akka maps to EAI Patterns
Might be up for debate or just plain wrong. Just some notes I scribbled down some time ago.
-----------------------------------------------------------------------------------------------------------------
EAI PATTERN AKKA PATTERN REFERENCE
-----------------------------------------------------------------------------------------------------------------
Point to Point Channel Regular Actor Communication http://www.eaipatterns.com/PointToPointChannel.html
Event-Driven Consumer Regular Actor Receive http://www.eaipatterns.com/EventDrivenConsumer.html
Message Selector Actor with Stash http://www.eaipatterns.com/MessageSelector.html
Publish-Subscribe Channel EventBus or DistributedPubSub http://www.eaipatterns.com/PublishSubscribeChannel.html
Dead Letter Channel DeadLetterActor http://www.eaipatterns.com/DeadLetterChannel.html
Return Address Implicit Sender Ref http://www.eaipatterns.com/ReturnAddress.html
Command or Event Message Akka Persistence http://www.eaipatterns.com/CommandMessage.html AND
http://www.eaipatterns.com/EventMessage.html
Request Reply Ask Pattern http://www.eaipatterns.com/RequestReply.html
Idempotent Receiver Idempotent Actor http://www.eaipatterns.com/IdempotentReceiver.html
Resequencer Message Sequence Ids http://www.eaipatterns.com/Resequencer.html
Aggregator Ask + Future composition http://www.eaipatterns.com/Aggregator.html
PollingConsumer Polling Actor http://www.eaipatterns.com/PollingConsumer.html
Wire Tap or Smart Proxy Forward Pattern http://www.eaipatterns.com/WireTap.html OR
http://www.eaipatterns.com/SmartProxy.html OR
http://www.eaipatterns.com/MessageTransformationIntro.html
Message Store Akka Persistence http://www.eaipatterns.com/MessageStore.html
Message Dispatcher BalancingDispatcher http://www.eaipatterns.com/MessageDispatcher.html
Messaging Gateway Inbox or ClusterClient http://www.eaipatterns.com/MessagingGateway.html
Pipes and Filters Pipelining or Typed Channels http://www.eaipatterns.com/PipesAndFilters.html
Dynamic Router Adaptive Routers http://www.eaipatterns.com/DynamicRouter.html
Broadcast Aggregate ScatterGather Router http://www.eaipatterns.com/BroadcastAggregate.html
Content-Based Router ConsistentHashing Router http://www.eaipatterns.com/ContentBasedRouter.html
-----------------------------------------------------------------------------------------------------------------
@sslavic
Copy link

sslavic commented Mar 18, 2014

Please correct me if wrong, but judging only from current Akka (2.3.0) documentation examples ConsistentHashing Router doesn't seem to match Content-Based Router pattern. CHR in Akka is more like partitioning to worker actors all with same behavior, where in CBR routees/endpoints/workers are different, with different logic/behavior.
IMO closer to CBR is plain Actor, with conditional pattern matching; downside is that Router Actor is tightly coupled to routees/endpoints/workers.

@ram-argus
Copy link

Any chance for an update including Akka-Stream?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment