Mmoreram\RSQueueBundle\Services\Publisher::publish PHP Метод

publish() публичный Метод

Enqueues payload inside desired queue
public publish ( String $channelAlias, Mixed $payload ) : Producer
$channelAlias String Name of channel to publish payload
$payload Mixed Data to publish
Результат Producer self Object
    public function publish($channelAlias, $payload)
    {
        $channel = $this->queueAliasResolver->getQueue($channelAlias);
        $payloadSerialized = $this->serializer->apply($payload);
        $this->redis->publish($channel, $payloadSerialized);
        /**
         * Dispatching publisher event...
         */
        $publisherEvent = new RSQueuePublisherEvent($payload, $payloadSerialized, $channelAlias, $channel, $this->redis);
        $this->eventDispatcher->dispatch(RSQueueEvents::RSQUEUE_PUBLISHER, $publisherEvent);
        return $this;
    }
Publisher