Try CoAkka when you use Kafka

Pick a workflow that dispatches work through Kafka. Check whether its topic forwards requests, retains records for readers, or does both.

The same pricing request

Checkout sends a basket to a pricing worker. Keep the same data and two processes while comparing the paths.

Kafka
Checkout → quote-requests topic → pricing worker
CoAkka Runtime · Peer
Checkout → samples.order.quote target → pricing handler

On the Kafka path, the application provides a way to receive the result if it needs one, such as a reply topic. On the CoAkka Runtime path, an ask returns the quote when the handler replies. If an admitted request has no route, the caller receives a Deadletter with its reason and original payload. See the Deadletter fields.

Criteria Kafka CoAkka Runtime
Destination The producer writes a record to a topic. Each record belongs to a partition, which can be selected by a key such as the basket ID. The caller uses the name of the work. The route determines which peers are eligible to handle it.
Acknowledgment and reply Record acknowledgment depends on acks. The quote comes back through the application’s response path. CoAkka Runtime matches the reply to the request. Delivery failures after admission can surface as Deadletters.
Multiple instances In a standard consumer group, Kafka assigns partitions to workers. The group can reassign partitions as membership changes. The app or platform supplies the peers. CoAkka Runtime selects an endpoint from the configured routes.
Retention and replay Kafka keeps records under the topic’s policy. Each group reads at its own position and can replay retained records. The app chooses durable storage when it needs to recover work, keep history, or replay it.
Ordering Records are ordered within each partition. A workflow can use a key to keep related records in the same partition. Check the ordering your business needs, especially when distributing work across peers or when a peer goes down.

Choose a workflow and preserve its guarantees

What the system relies on What to try or keep
The topic dispatches one named internal task Try a pricing request in staging when the workflow needs only the current result. Keep a one-way flow one-way when that is what the workflow requires.
Workers resume after downtime, or multiple groups replay records Keep Kafka for that topic. Check operations, reporting, and analytics groups reading at their own pace.
Work must be recorded with a business transaction Try a transactional outbox in the existing DB. Record the job before sending it and use a work ID to handle redelivery safely.
Check what the topic does today
  • Find producers, consumer groups, and the response path. Check whether any group reprocesses records or starts at an earlier offset.
  • Record acks, retention, partition keys, and when consumers commit their offsets.
  • For workflows that write data, check how the app recognizes redelivery of the same work. Preserve duplicate-handling and ordering rules.

Try switching only the pricing workflow

  1. Record the current path. Use a sample basket and record the quote, time from dispatch to result, and what happens when the worker stops. Keep the Kafka path available for rollback.
  2. Try CoAkka Runtime in staging. Use the same two processes, input data, and comparable load. Check the result when the worker returns a quote, when the route is missing, and when the worker responds late.
  3. Compare business outcomes. Compare errors, p99, and recovery. If other workflows still use Kafka, record which resources you can actually remove.

After a timeout on a side-effecting request such as a charge, check the transaction outcome before retrying. Work that must survive a restart needs durable storage before dispatch.

The existing basket demo shows the CoAkka Runtime path. Use your current Kafka workflow as the control in the trial.

Source documentation