Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fesor/bugs-bunny

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bugs Bunny

This repository contains a set of examples as well as the facade over Bunny to help with reliable message delivery.

Assumptions:

  • Both producer and consumer of messages are synchronous. Php is still not a good fit for the async workload.
  • You have rabbitmq cluster of 3+ nodes with pause-minority policy
  • You rely on competing consumers, and you don't care about the order in which messages are going to be processed
  • Queue/Exchange bindings are static. i.e., there are no dynamic routing rules applied so we could avoid problems that there is no consumer for a given routing key
  • Your application is running in Kubernetes

What we need:

  • Reconnect and retry with back-off when a node is not available
  • Ability to manually send heartbeat frame in case of a long-running task to keep the connection alive
  • Store outbound messages in the buffer until the broker confirms delivery
  • Retry publishing if broker rejected a message

Examples

Examples rely on toxiproxy. I was also lazy to provide PHP image. To simplify infrastructure, only RabbitMQ runs in docker and network conditions simulated by toxiproxy, which should be installed on your machine.

Reference Materials

About

Reliable messaging with bunny client for RabbitMQ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published