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] Allow different types of busses #26652

Copy link
Copy link
Closed
@Nyholm

Description

@Nyholm
Issue body actions
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? yes
Symfony version 4.1

I want to have multiple buses with different features. Example of different buses might be:

Default bus

  • Allows zero or more handlers
  • Supports both sync and async
  • Return values are optional

Command bus

  • Exactly one handler required
  • Supports both sync and async
  • No return values from handlers

Event bus

  • Allows zero or more handlers
  • Supports both sync and async
  • No return values from handlers

Query bus

  • Exactly one handler required
  • Supports only sync
  • Return values required

Example config:

framework:
  messenger:
    middlewares: ~ # default middlewares
    bus_foo:
      type: foo
      routing:
        'App\Bar': ['sender.bar', 'sender.biz']
        'App\Foo': 'sender.foo'
      middlewares:  # bus specific middlewares
        - 'custom_service'
        - validation: true

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.