8000 [Messenger] Add a way to only call the handler assigned to a queue · Issue #30110 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Messenger] Add a way to only call the handler assigned to a queue #30110
Closed
@tkocjan

Description

@tkocjan

Description
With RabbitMQ you can set up a topic in a pub/sub configuration by binding multiple queues to one exchange. You can configure messenger transports to those different queues. The message is sent to the exchange and the same message is posted to both queues. A worker on one queue performs one type of operation (like sending an email) and another worker on the other queue performs a different operation (like sending an SMS).

Here is the problem:

You can set up workers to each of the queues through the transport with “bin/console messenger:consume-messages [transport]”, that works great. The problem is that both workers call both handlers because the message class in both handlers is the same. What is needed is a way to specify the handlers for each worker.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0