codejump

Async & Message Queues — Series 2

Preview — 3 of 10 questions

Events for each order must be consumed in broker append order. A partitioned log has no global order across partitions. What is required?

AKeep each order on one partition and preserve processing order.
BPut all consumers in different groups to establish a common order.
CSort events by the receiving worker's local wall-clock time.
DDistribute each order randomly across partitions to balance every message.

A consumer changes local SQL state and records an event ID as processed. What prevents both duplicate effects and a crash gap between those actions?

ACommit the event marker and state change in one database transaction.
BCheck the marker in memory and periodically snapshot the set.
CUpdate state first, then write the marker after acknowledgment.
DCommit the marker first, then update state in a later transaction.

Saving an order succeeds but publishing its event fails. What does a transactional outbox change?

ARequire the broker to discover new orders by reading request logs.
BMark the order complete only in the application's local cache.
CStore the order and publish intent atomically, then relay with retries.
DPublish first and assume the later database write will succeed.

Sign up free to play

Answer all 10 questions (7 more), see explanations for every answer, and track your score.