Prooph\ServiceBus\Async\MessageProducer::__invoke PHP Method

__invoke() public method

A producer MUST be able to handle a message async without returning a response. A producer MAY also support future response by resolving the passed $deferred. Note: A $deferred is only passed by a QueryBus but in this case the $deferred MUST either be resolved/rejected OR the message producer MUST throw a Prooph\ServiceBus\Exception\RuntimeException if it cannot handle the $deferred
public __invoke ( Prooph\Common\Messaging\Message $message, Deferred $deferred = null ) : void
$message Prooph\Common\Messaging\Message
$deferred React\Promise\Deferred
return void
    public function __invoke(Message $message, Deferred $deferred = null);
MessageProducer