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
Which messaging pattern allows producers to publish messages to a topic that multiple consumers can independently subscribe to and receive?
Answer: Publish/Subscribe
Publish/Subscribe (pub/sub) decouples producers from consumers by routing messages through a topic, allowing multiple independent subscribers to receive each message.
In Apache Kafka, what is the primary role of a partition within a topic?
Answer: To enable parallel processing and horizontal scalability
Partitions divide a topic across multiple brokers, allowing consumers in a consumer group to process different partitions simultaneously, enabling horizontal scalability.
What is the purpose of a Dead Letter Queue (DLQ) in a message queuing system?
Answer: To hold messages that failed processing after maximum retry attempts
A DLQ captures messages that could not be successfully processed after exhausting retries, isolating them for inspection and preventing queue blockage.
Which message delivery guarantee ensures that every message is delivered at least once but may result in duplicates?
Answer: At-least-once delivery
At-least-once delivery guarantees no message is lost by retrying on failure, but the trade-off is that consumers must handle potential duplicate messages idempotently.
In event-driven architecture, what does the term 'event sourcing' refer to?
Answer: Storing state changes as an immutable sequence of events rather than the current state only
Event sourcing persists each state change as an ordered, immutable event log, allowing system state to be reconstructed by replaying events from any point in time.
What is the primary advantage of using an asynchronous messaging pattern over synchronous REST calls in a distributed system integration?
Answer: It decouples sender and receiver, improving resilience when services are temporarily unavailable
Asynchronous messaging decouples producers and consumers so that if the consumer is temporarily down, messages queue up and are processed when it recovers, increasing overall system resilience.
Which of the following best describes a 'message broker' in an integration architecture?
Answer: An intermediary that receives, routes, and delivers messages between applications
A message broker is an intermediary component (e.g., RabbitMQ, ActiveMQ) that accepts messages from producers, applies routing logic, and delivers them to the appropriate consumers.