← All CSI Flashcard Decks

Message Queuing & Event-Driven Architecture Flashcards

7 cards from real CSI practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 Message Queuing & Event-Driven Architecture flashcards as text
  1. In RabbitMQ, which exchange type routes messages to queues based on an exact match of the message's routing key?

    Answer: Direct exchange

    A direct exchange routes messages to queues whose binding key exactly matches the message's routing key, making it suitable for task distribution to specific workers.

  2. What is the CQRS pattern and how does it relate to event-driven architectures?

    Answer: Command Query Responsibility Segregation — separates read and write models, often using events to sync the write side to read projections

    CQRS separates command (write) and query (read) operations, and pairs naturally with event sourcing: commands emit events that update denormalized read models asynchronously.

  3. A system integrator needs to guarantee message ordering within a specific subset of events. Which Kafka feature supports this requirement?

    Answer: Partition keying by a consistent message attribute

    By assigning a consistent partition key (e.g., customer ID), all messages with the same key are routed to the same partition, preserving order for that key within Kafka's ordered partition log.

  4. Which integration pattern uses a persistent store to record outgoing messages before they are sent, ensuring they are eventually delivered even if the broker is temporarily unavailable?

    Answer: Transactional outbox pattern

    The transactional outbox pattern writes the message to a local database table within the same transaction as the business operation, then a relay process publishes it to the broker, preventing message loss.

  5. In event-driven microservices, what is a 'saga' pattern used for?

    Answer: Managing distributed transactions across multiple services using a sequence of local transactions and compensating events

    The saga pattern coordinates multi-step distributed transactions by chaining local transactions and using compensating transactions to roll back completed steps if a later step fails.

  6. What does 'consumer group' mean in the context of Apache Kafka?

    Answer: A named group of consumers where each partition is consumed by only one member, enabling parallel load-balanced processing

    A consumer group allows multiple consumer instances to share the work of consuming a topic, with each partition assigned to exactly one consumer in the group at a time for balanced parallel processing.

  7. Which of the following is a key characteristic of an idempotent consumer in a message-driven system?

    Answer: Processing the same message multiple times produces the same outcome as processing it once

    An idempotent consumer handles at-least-once delivery safely by ensuring that reprocessing a duplicate message does not cause unintended side effects like double charges or duplicate records.