G
G
grabbee2021-07-24 17:03:44
symfony
grabbee, 2021-07-24 17:03:44

How to add an alias to the message bus in Symfony?

I don’t know how it happened, but messages with the bus name "messenger.bus.default" got into the failed doctrine://default queue

framework:
  messenger:
    default_bus: command_bus

When I run php bin/console messenger:consume failed an error occurs
"Bus named "messenger.bus.default" does not exist."

Because the message says the name of the bus
{s:55:\"\0Symfony\\Component\\Messenger\\Stamp\\BusNameStamp\0busName\";s:21:\"messenger.bus.default\";}}

How it got there I don't know. Probably after I added "default_bus: command_bus" . Now both tire names are there as well.

---
It seems to me that I need to somehow add an alias to the name of this bus "messenger.bus.default" - command_bus
But I don't know how to do this

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
grabbee, 2021-07-24
@grabbee

You just need to add

buses:
      messenger.bus.default: ~

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question