/** * Create a publisher that publishes messages to this queue. * * @param PublisherOptions|null $options Options that affect publisher behaviour (null = defaults). * @param Channel|null $channel The channel used to send messages (null = auto-managed). */ public function publisher(PublisherOptions $options = null, Channel $channel = null) : Publisher { return new Amqp091Publisher($this->connectionManager, $options ?: PublisherOptions::defaults(), '', $this->name, $channel); }
/** * Create a publisher that publishes messages to this exchange. * * @param PublisherOptions|null $options Options that affect publisher behaviour (null = defaults). * @param Channel|null $channel The channel used to send messages (null = auto-managed). */ public function publisher(PublisherOptions $options = null, Channel $channel = null) : Publisher { if (null === $options) { $options = PublisherOptions::defaults(); } return new Amqp091Publisher($this->connectionManager, $options, $this->name, null, $channel); }