Fanout Exchange — Concept Check
Questions on Fanout Exchange. Broadcasts every message to all bound queues regardless of routing key; perfect for publish-subscribe where all consumers need every event (e.g., cache invalidation).
Questions in this quiz
8 questions on Fanout Exchange — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.In a distributed system, you need to broadcast cache invalidation messages to all service instances. Which exchange type should you use?
- AFanout exchange
- BDirect exchange
- CTopic exchange
- DHeaders exchange
2.A new logging service needs to receive all events from an existing fanout exchange. What should you do?
- AModify the publisher to include the new service
- BDeclare a new queue and bind it to the fanout exchange
- CAdd a routing key for the new service
- DChange the exchange type to topic
3.What happens if you publish a message with a routing key to a fanout exchange?
- AOnly queues with matching routing keys receive the message
- BThe routing key determines priority of message delivery
- CThe message is discarded if no routing key matches
- DThe routing key is ignored and all bound queues receive the message
4.A developer believes that using a fanout exchange will allow selective message delivery based on routing keys. What is the flaw in this belief?
- AFanout exchanges need manual routing configuration
- BFanout exchanges ignore routing keys and broadcast to all queues
- CFanout exchanges require specific routing keys for delivery
- DFanout exchanges do not support multiple queues
5.How can a fanout exchange improve system-wide notification delivery?
- ABy prioritizing notifications based on urgency
- BBy ensuring every service receives every notification
- CBy allowing selective delivery based on service needs
- DBy reducing the number of queues needed
6.Why might a fanout exchange be preferred over a topic exchange for audit logging?
- ATopic exchanges cannot handle audit logs
- BAudit logs require selective message delivery
- CFanout exchanges are faster than topic exchanges
- DAll services need a copy of every event for auditing
7.A service using a fanout exchange experiences message delays. What could be a potential cause?
- AThe exchange type needs to be changed to direct
- BThe fanout exchange is not compatible with the service
- CA queue is processing messages slower than others
- DThe exchange is overloaded with too many routing keys
8.What is a key advantage of using a fanout exchange for event fan-out to multiple processing pipelines?
- AIt requires fewer queues compared to other exchanges
- BIt enables priority-based message delivery
- CIt allows dynamic message filtering by consumers
- DIt simplifies the publisher's logic by ignoring routing keys