-2

I am developing CQRS application and have to choose underlying implementation of Command Bus. We already decided to use Kafka as Event Bus. But what about Command bus? From my point of view Kafka is too complex for Command Bus requirements, for example we don't need to store commands persistently and we should reject them if no one of services handled it in real time. What better to use as distributed command bus instead then?

imissyouso
  • 25
  • 1
  • 5

1 Answers1

0

Kafka doesn't care what you store on it; it is just bytes. Commands/Actions are what happen when you process events.

Creating an ESB with Kafka is considered an anti-pattern

we don't need to store commands persistently

Then lower the retention on the topics to not store them as long.

we should reject them if no one of services handled it in real time

Why? Then you're just dropping events, and sounds like you'd be better off with just point-to-point communications and a health checking mechanism (see gRPC)

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245