Event-Driven Architecture — Concept Check
Questions on Event-Driven Architecture. Services emit domain events when state changes; other services subscribe and react autonomously — enabling loose coupling, audit trails, and temporal decoupling.
Questions in this quiz
8 questions on Event-Driven Architecture — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A service in your architecture is publishing events to Kafka but some consumers are processing the same event multiple times. What should you do to ensure idempotency?
- AStore processed event IDs in a database and check before processing
- BRely on consumer offsets to prevent duplicate processing
- CUse Kafka's exactly-once delivery feature
- DIncrease the consumer group count to handle duplicates
2.Your team is designing a new microservice that will consume 'OrderPlaced' events. Which practice should you avoid to maintain loose coupling?
- ASubscribing to only relevant events
- BMaking synchronous API calls in response to events
- CProcessing events in a local transaction
- DUsing event-carried state transfer
3.A developer suggests publishing events with all possible fields to cover future consumer needs. Why is this a bad idea?
- AIt reduces the number of events published
- BIt couples producers to consumer-specific data needs
- CIt simplifies consumer logic
- DIt ensures all consumers have the necessary data
4.After implementing the Outbox Pattern, you notice some events are still not reaching Kafka. What might be the issue?
- AKafka topic is not properly configured
- BThe event payload is too large
- CThe database transaction failed
- DThe relay process is not running or misconfigured
5.Why is it important for domain events to be immutable?
- ATo reduce the size of the event payload
- BTo allow consumers to modify events as needed
- CTo enable synchronous processing of events
- DTo ensure the event accurately represents a past fact
6.A service publishes an 'OrderPlaced' event, but consumers are not reacting as expected. What could be a potential cause?
- AThe producer service is down
- BConsumers are not subscribed to the correct event topic
- CThe message broker is using at-most-once delivery
- DThe event payload is too small
7.Which of the following is a benefit of temporal decoupling in Event-Driven Architecture?
- AProducers and consumers must be tightly integrated
- BServices can evolve and scale independently
- CConsumers must always be online
- DEvents are processed in real-time
8.In an Event-Driven Architecture, what is the primary role of a message broker like Kafka?
- ATo convert events into API calls
- BTo facilitate asynchronous communication between services
- CTo ensure all events are processed exactly once
- DTo store events permanently