Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Messenger] Ability to dispatch retryEnvelope to another bus #31848

Copy link
Copy link
Closed
@proArtex

Description

@proArtex
Issue body actions

I have separate buses like this:

# messenger.yaml

framework:
    messenger:
        default_bus: my.sender
        buses:
            my.sender:
                default_middleware: false
                middleware:
                    - messenger.middleware.send_message
            my.receiver:
                default_middleware: false
                middleware:
                    - App\Middleware\MyMiddleware
        transports:
            async:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                retry_strategy:
                    max_retries: 999
                    delay: 10000
                    multiplier: 1
                    max_delay: 0
        routing:
             '*': async

I use command bin/console messenger:consume async --bus=my.receiver.

So we have a retryEnvelope dispatch call that goes directly to the same receiver bus. Variable $bus comes from ConsumeMessagesCommand:

# ConsumeMessagesCommand.php
$bus = $this->busLocator->get($input->getOption('bus'));

# Worker.php
$this->bus->dispatch($retryEnvelope);

Since I have different buses (I strongly believe that one bus per send/receive ops is kind of workaround with "ifs"), I need an ability to somehow point to another bus. Is there any solution coming? Did I miss something?

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.