Skip to content

[Messenger] Improve handler options description #19120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions messenger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2016,11 +2016,16 @@ You can configure your handler by passing options to the attribute::

Possible options to configure with the attribute are:

* ``bus``
* ``fromTransport``
* ``handles``
* ``method``
* ``priority``
============================ ====================================================================================================
Option Description
============================ ====================================================================================================
``bus`` Name of the bus from which the handler can receive messages, by default all buses.
``fromTransport`` Name of the transport from which the handler can receive messages, by default all transports.
``handles`` Type of messages (FQCN) that can be processed by the handler, only needed if can't be guessed by
type-hint.
``method`` Name of the method that will process the message, only if the target is a class.
``priority`` Priority of the handler when multiple handlers can process the same message.
============================ ====================================================================================================

.. _messenger-handler-config:

Expand Down Expand Up @@ -2079,11 +2084,16 @@ by tagging the handler service with ``messenger.message_handler``

Possible options to configure with tags are:

* ``bus``
* ``from_transport``
* ``handles``
* ``method``
* ``priority``
============================ ====================================================================================================
Option Description
============================ ====================================================================================================
``bus`` Name of the bus from which the handler can receive messages, by default all buses.
``from_transport`` Name of the transport from which the handler can receive messages, by default all transports.
``handles`` Type of messages (FQCN) that can be processed by the handler, only needed if can't be guessed by
type-hint.
``method`` Name of the method that will process the message.
``priority`` Priority of the handler when multiple handlers can process the same message.
============================ ====================================================================================================

.. _handler-subscriber-options:

Expand Down