What is the primary role of RabbitMQ in an event sourcing architecture?
Think about what RabbitMQ does best in a system that uses events.
RabbitMQ is a message broker that transports events reliably between producers and consumers. It does not store the full application state or execute business logic.
What is the output of the following RabbitMQ CLI command?
rabbitmqctl list_queues
This command lists queues and their message counts if the server is running.
The rabbitmqctl list_queues command outputs all queues with their message counts if RabbitMQ is running properly.
Which RabbitMQ queue configuration ensures that events are not lost if the broker restarts?
Durability means the queue survives broker restarts.
Setting durable=True makes the queue survive RabbitMQ restarts, which is critical for event sourcing to avoid losing events.
In an event sourcing system using RabbitMQ, what is the correct order of steps when a new event is generated?
Think about storing the event before publishing it.
In event sourcing, the event is first stored in the event store, then published to RabbitMQ exchange, routed to queues, and finally consumed.
You notice that some events are missing from your consumer application logs. Which RabbitMQ misconfiguration is the most likely cause?
Consider what happens to non-durable queues on broker restart.
Non-durable queues are deleted when RabbitMQ restarts, causing events to be lost and missing from consumers.