service-bus icon indicating copy to clipboard operation
service-bus copied to clipboard

Improve message producer documentation

Open codeliner opened this issue 7 years ago • 1 comments

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.

codeliner avatar Aug 10 '16 21:08 codeliner

@codeliner are you going to provide that documentation (two years later) or do you want to close this issue?

prolic avatar Oct 22 '18 21:10 prolic