I have got a bit of a problem,
I am using Kafka with CQRS in NestJS.
My question is: What is the best way to handle errors in the write process?
I send request onto an web api to my nestjs application
I have and event
ObjectedCreatedEvent
is send it on the event bus after creation and write it into kafka (confluent.cloud).Kafka responds with error 87 because the message validation against a json schema failed (that's ok so far)
How can i respond properly to the web api that an error occured?
Just have started another listener in the process? I would expect kafka (confluent cloud) would have to topic for such things at least.
I would just have an Event ObjectValdiationFailedEvent
and put it onto the eventbus.