When should I use ZeroMQ and when should I use Akka

akkamultithreading

My understanding of Akka is that it allows you to define groups of mini-threads ("Actors") and then have them communicate with each other (and do work) using events.

My understanding of ZeroMQ is that its a TCP socket library that allows threads to communicate with each other over TCP/ports.

My question: these seem like very similar concepts. However, I'm sure that in reality, they are meant to solve entirely different problems. So:

Intention-wise, what is the difference between these two tools? What different problems do they solve? Are there clear/concrete use cases where one is preferable to the other?

Best Answer

You're right, they are separate technologies.

Akka uses ZeroMQ under the covers. From their documentation:

Akka provides a ZeroMQ module which abstracts a ZeroMQ connection and therefore allows interaction between Akka actors to take place over ZeroMQ connections.

Akka provides an implementation of the Actor Model whereas ZeroMQ is trying to avoid your having to implement a brokered Message Queue system of some sort.

Related Topic