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] AMQP configuration and MessageBus::dispatch enhancements #29950

Copy link
Copy link
Closed
@bentcoder

Description

@bentcoder
Issue body actions

AMQP configuration

Based on the current configuration options, we can define only one routing_key per queue with routing_key option. This could be improved to allow us to define multiple routing keys with routing_keys options. As we all know by now a queue bound to a topic or direct exchange can have more than one routing_key. This is how it would enhance things.

e.g.

framework:
    messenger:
        transports:
            amqp:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                options:
                    ...
                    queue:
                        ...
                        routing_keys: ['key_1', 'key_2' ...]

MessageBus::dispatch

We should have a way of setting routing_key at MessageBus::dispatch() level. Whether it is via an Envelope or a Stamp.

e.g.

$bus->dispatch(
     new Envelop(
          new MyMessage(...),
          new RoutingKeyStamp('key_1')
     )
);
$bus->dispatch(
     (new Envelop(
          new MyMessage(...)
     ))
     ->with(new RoutingKeyStamp('key_1'));
);

Not as critical as the ones above for now but:

It would also be nice to see a:

  • Remote Procedure Call (RPC) feature which returns response/result back to MessageBus::dispatch(). This is obviously a synchronise call.
  • Dead-Letter Exchange feature

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.