Try CoAkka when you use ZeroMQ

Start with one internal call. Check the socket pattern, what your application manages, and how to try CoAkka Runtime on the same workflow.

The same pricing call

Application A sends a basket to the pricing handler in B. Keep two processes on both paths so you can compare the messaging layer.

ZeroMQ · TCP
A → ZeroMQ sockets over TCP → B reads the frames and prices the basket
CoAkka Runtime · Peer
A → calls target samples.order.quote → CoAkka Runtime routes to B

ZeroMQ has multipart messages and a reply envelope that carries return addresses. A ROUTER socket routes by connection identity. In CoAkka Runtime, the destination is the name of the work. The application declares a route for that name and reads the outcome through common Envelope or Deadletter fields.

Criteria ZeroMQ CoAkka Runtime
Integration The app chooses socket types, connection addresses, and how to encode its data into frames. The app chooses a connector, registers named handlers, and declares routes for the work.
Routing The socket pattern controls delivery. ROUTER can select a recipient by connection identity. The target name maps to eligible endpoints. A route can move the handler while A keeps calling the same name.
Multiple instances The app or proxy manages connections. DEALER sends round-robin across connected peers. ROUTER selects the specified connection identity. The app or platform adds B1 and B2 to the same target route. CoAkka Runtime distributes calls by weight when configured to do so.
Message metadata A reply envelope carries the return path. The application defines what its body frames mean. An Envelope carries the target, a request–reply correlation ID, payload type information, and the payload.
Delivery outcomes The app observes replies and errors according to the socket type, timeouts, and configured options. An admitted request can return a quote or a Deadletter when CoAkka Runtime encounters a delivery failure such as a missing route.

If pricing has no route, A receives ROUTE_MISS in a Deadletter with the original Envelope and payload. The app can keep the data it needs in a pending-work list for review or follow-up. See Deadletter outcomes and the original payload.

Which socket pattern do you use?

The library name tells you where to look in the code. The socket pattern tells you whether the flow requests a reply, publishes updates, or distributes work.

Socket pattern What it does What to try
REQ / REP One side asks and the other replies. Start with a read-only call such as pricing. Compare the reply and the wait budget.
DEALER / ROUTER Flexible request–reply, with multiple outstanding requests or a proxy that selects connections. Try a named call. Check reply matching, handler selection, and what happens when that handler stops.
PUB / SUB and XPUB / XSUB Distribute updates to subscribers. XPUB and XSUB support handling subscriptions on a forwarding path. Keep flows that rely on subscription or fan-out behavior. Pick a separate internal call to try.
PUSH / PULL Distribute work across workers connected to a pipeline. Try one kind of work if it fits a named target. Check distribution, required ordering, and queue saturation.
PAIR Connects exactly two sockets, commonly between threads in one process. If you try Embedded for a named task, check startup, delivery, and shutdown on both sides.
STREAM Communicates with raw TCP peers. Keep the TCP interface for connected peers. Try CoAkka Runtime on an internal call behind it.
Identify your ZeroMQ library
C / C++
libzmq, CZMQ, or cppzmq
Python / Node.js / Go
PyZMQ, the Node.js zeromq package, or a Go binding such as GoCZMQ
Java / .NET
JeroMQ and NetMQ are implementations for their respective runtimes. JZMQ and clrzmq4 bind to libzmq.
Additional socket types and related libraries

Check support and behavior in the exact libzmq or binding version you run.

  • CLIENT / SERVER supports asynchronous sends on either side after the client starts the exchange.
  • RADIO / DISH publishes to groups. Check group membership and delivery behavior.
  • SCATTER / GATHER distributes data one-way. Check distribution when a receiver is slow.
  • PEER selects connections by identity, and CHANNEL connects a pair of sockets. Check destination selection and how threads share connections.

For nanomsg or NNG, reuse the checklist by messaging pattern and verify that library’s own contract.

Try switching just the pricing call

  1. Record the current behavior. Capture the socket pair, frame format, handler selection, and timeout conditions. Keep the ZeroMQ path as a control.
  2. Try it in a separate environment. Move both ends of the trial flow to CoAkka Runtime, or translate messages at an application-owned integration boundary. Keep the inputs, two processes, and offered load the same.
  3. Check outcomes before expanding. Verify the quote, missing route, stopped handler, and timeout. Compare p99, errors, and the application code needed to select a destination or match a response.

Expand when the new flow preserves the guarantees you need and you can switch back. For work that must survive a restart, decide where it is recorded before sending.

Source documentation