public function sendEvent($name, $message)
    {
        if (false == $message instanceof Message) {
            $message = $this->context->createMessage($message);
        }

        $message->setProperty(Config::TOPIC, $name);

        $topic = $this->context->createTopic('enqueue.default');
        $topic->setType(AmqpTopic::TYPE_FANOUT);
        $topic->addFlag(AmqpTopic::FLAG_DURABLE);

        $this->context->createProducer()->send($topic, $message);
    }
public function sendEvent($name, $message)
    {
        if (false == $message instanceof Message) {
            $message = $this->context->createMessage($message);
        }

        $message->setProperty(Config::TOPIC, $name);

        $topic = $this->context->createTopic('enqueue.default');
        $topic->setType(AmqpTopic::TYPE_FANOUT);
        $topic->addFlag(AmqpTopic::FLAG_DURABLE);

        $this->context->createProducer()->send($topic, $message);
    }
public function sendEvent ( $ name , $ message ) { if ( false == $ message instanceof Message ) { $ message = $ this -> context -> createMessage ( $ message ) ; } $ message -> setProperty ( Config :: TOPIC , $ name ) ; $ topic = $ this -> context -> createTopic ( 'enqueue.default' ) ; $ topic -> setType ( AmqpTopic :: TYPE_FANOUT ) ; $ topic -> addFlag ( AmqpTopic :: FLAG_DURABLE ) ; $ this -> context -> createProducer ( ) -> send ( $ topic , $ message ) ; }
Send multicast event

@param $name
@param AmqpMessage $message
@throws \Interop\Queue\Exception
@throws \Interop\Queue\InvalidDestinationException
@throws \Interop\Queue\InvalidMessageException
Send multicast event