@param ChannelInterface $channel
@param MessageInterface $message

@return $this
546106
public function setMessage(ChannelInterface $channel, MessageInterface $message)
    {
        $this->messages[$channel->getIdentifier()] = $message;

        return $this;
    }
596215
public function bind($queueName, MessageProcessorInterface $messageProcessor)
    {
        if (empty($queueName)) {
            throw new \LogicException('The queue name must be not empty.');
        }
        if (array_key_exists($queueName, $this->boundMessageProcessors)) {
            throw new \LogicException(sprintf('The queue was already bound. Queue: %s', $queueName));
        }

        $this->boundMessageProcessors[$queueName] = $messageProcessor;

        return $this;
    }
327479
public function addMessage(\BisonLab\SakonninBundle\Entity\Message $messages)
    {
        $this->messages[] = $messages;

        return $this;
    }
985748
public function process(MessageInterface $message)
    {
        return $this->worker->forward()->dispatch($message->getContent(), $message->getMetadata());
    }
302388
public static function register($channel, \Psr\Log\LoggerInterface $logger)
    {
        self::$loggers[$channel] = $logger;

        return $logger;
    }
787182
public function addChannel(ChannelOptions $channel)
    {
        $key = $channel->getKey();
        $this->channels[$key] = $channel;
        return $this;
    }
728057
private function type($message, $type)
    {
        $this->type = $type;

        $this->message = $message;

        return $this;
    }
1328175
public function addMessage(Message $message)
    {
        $message->setMessageBroker($this);
        $this->messages->attach($message);
    }
256193
public function setChannel(array $channel)
    {
        foreach ($channel as $element => $value) {
            $setter = 'set' . ucfirst($element);

            if (method_exists($this, $setter)) {
                $this->$setter($value);
                unset($channel[$element]);
            }
        }

        $this->channel = $channel;

        return $this;
    }
777112
public function info($channel, $message, array $context = [])
    {
        $this->log($channel, LogLevel::INFO, $message, $context);

        return $this;
    }
1013201
public function hydrate(MessageInterface $message, array $data)
    {
        foreach ($data as $key => $value) {
            $setter = 'set' . ucfirst($key);

            if (!method_exists($message, $setter)) {
                throw new \RuntimeException(sprintf('Unable to found setter for "%s" data key', $key));
            }

            $message->$setter($value);
        }

        return $message;
    }
1199878
public function publish($channel, $message)
    {
        foreach ($this->getSubscribersForChannel($channel) as $handler) {
            call_user_func($handler, $message);
        }
    }
1244859
public function setCommunication( MW_Communication_Interface $communication )
	{
		parent::setCommunication( $communication );

		$this->_object->setCommunication( $communication );
	}
1374055
public function addChannel(ChannelInterface $channel): bool
    {
        if (!$this->getChannels()->contains($channel)) {
            $this->channels->add($channel);
        }
        
        return true;
    }
126262
public function message($channel, $message, $identity, array $attachments = [], array $clientOptions = [])
    {
        if (!$this->identityBag->has($identity)) {
            throw new \InvalidArgumentException(sprintf('identity "%s" is not registered', $identity));
        }

        return $this->client->send(
            Actions::ACTION_POST_MESSAGE,
            array_merge([
                'identity'    => $this->identityBag->get($identity),
                'channel'     => $channel,
                'text'        => $message,
                'attachments' => $attachments,
            ], $clientOptions)
        );
    }
267791
public function createChannel(string $channel, ?string $level = null): LoggerInterface
    {
        return $this->getLogger($channel, $level);
    }
716602
public function addLog($message, $level = LoggerInterface::INFO)
    {
        if ($this->logger) {
            $this->logger->log($message, $level);
        }

        return $this;
    }