Skip to content

Improve message producer documentation #129

@codeliner

Description

@codeliner

Provide better explanation and examples of async message routing.

See chat discussion for the why?

Guy Radford @guyradford 22:08
...
I have managed to get the router to put the ActionEvent out through Bernard... but the router then try to route the message internally... I have trued to get$actionEvent->stopPropagation(true); and $actionEvent->setParam(MessageBus::EVENT_PARAM_MESSAGE_HANDLED, true); but neither works.

Alexander Miertsch @codeliner 22:27
...
Your router invokes BernardMessageProducer directly? If so, this is the problem. The router should route your command to the BernardMessageProducer only. All message producers are callable so they can be used as (or better replace) command handlers. We should make that more clear in the docs.
For now take a look at the proophessor-do snapshot tutorial. In the last paragraph you can see how the TakeSnapshot command is routed to zeromq-message-producer instead of a in-process-command-handler (see the route config example).
You just need to do the same in your application. You don't even need a specific router for the task.

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