Skip to content

[Question] Why I need -b parameter to receiver #22

@repli2dev

Description

@repli2dev

Sorry for question in issues but I miss one thing from the documentation that prevents me from finishing integration.

I have configuration:

messenger:
    buses:
        mailSenderBus:
            singleHandlerPerMessage: true
    transports:
        postgres: 'doctrine://default'
    routing:
        SendMailRequest: postgres

services:
    mailSenderBus: MailSenderBus(@messenger.mailSenderBus.bus)
    mailSenderHandler:
        class: MailSenderHandler
    doctrineTransportFactory:
        class: Symfony\Component\Messenger\Bridge\Doctrine\Transport\DoctrineTransportFactory
        tags: [messenger.transportFactory]

Messages are enqueued OK, yet when I run

bin/console messenger:consume -vvv postgres

The messages are not handed... I have to run this to make it work

bin/console messenger:consume -vvv postgres -b mailSenderBus

Why? Is that desired? The expected behaviour is that the first command should process all the messages, instead it gets to the envelope and silently discards it... which is 🤯

Thanks for clarification

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions