Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[Messenger] AMQP Pubsub style exchange with individual queue per consumer #32171
framework: messenger: transports: amqp: dsn: '%env(MESSENGER_TRANSPORT_DSN)%' options: queue: name: 'pubsub_%rand(5)%' binding_keys: pubsub exchange: name: pubsub type: fanout
@Tobion thanks for the review. First thing regarding the empty name AMQP ext doesn't allow you to call
Second, the idea is you create fanout exchange, and every time you spawn a consumer server would generate a random name and would bind that queue to that exchange. As I set the flag exclusive that queue will be deleted after channel/connection is closed. This way every consumer spawn will receive the same message which was dispatched to that queue.
Regarding binding key yes you are right it's not needed, it was my assumption it's not bound and used default exchange or etc.