Knowledgebase

Working With Message Queues and Brokers Print

  • backenddevelopment, backend, guide, howto, solution, zillionkinghost, hosting, support
  • 0

Asynchronous infrastructure.

WHAT A BROKER PROVIDES

Reliable delivery of messages between producers and consumers.

WHAT THE PATTERNS ARE

A queue, where one consumer processes each message Publish and subscribe, where every subscriber receives it

WHAT TO CHOOSE

A queue for work distribution Publish and subscribe for notifying several systems

WHAT DELIVERY GUARANTEES MEAN

  • At most once: may be lost
  • At least once: may be duplicated
  • Exactly once: rarely achievable in practice

WHAT TO DESIGN FOR

At least once, meaning duplicates.

WHAT THAT REQUIRES

Processing that is safe to repeat.

WHAT ACKNOWLEDGEMENT DOES

Confirms a message was processed, so it is not redelivered.

WHEN TO ACKNOWLEDGE

After processing succeeds, not on receipt.

WHY

Acknowledging first loses the message if processing fails.

WHAT A DEAD LETTER DESTINATION IS FOR

Messages that repeatedly fail, so they do not block the queue.

WHAT TO MONITOR

Depth, age of the oldest message, and the dead letter destination.

WHAT TO PLAN

What happens when the broker is unavailable.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot