In #104 I made it possible for the #publish method to override publishing options. That makes it possible to set the routing key per message. Even though I only documented this for the TopicExchangePublisher in that PR (since that is where we were going to use it), this works for the DefaultExchangePublisher too.
The DefaultExchangePublisher however, has a mandatory queue_name argument, which doesn't make sense in that case. We should make that argument optional.
This is something that would be nice to have with RabbitMQ RPC (using direct reply), as we would need to set different routing keys per message then. Until we have fixed this, we could perhaps just set queue_name to an empty string, since it won't be used then.
Todo
[ ] Make the queue_name argument optional
[ ] Document that the DefaultExchangePublisher supports options in the #publish method, as I only documented this for the TopicExchangePublisher (both of those classes includes the Publisher module, so their #publish methods have the same functionality)
In #104 I made it possible for the
#publish
method to override publishing options. That makes it possible to set the routing key per message. Even though I only documented this for theTopicExchangePublisher
in that PR (since that is where we were going to use it), this works for theDefaultExchangePublisher
too.The
DefaultExchangePublisher
however, has a mandatoryqueue_name
argument, which doesn't make sense in that case. We should make that argument optional.This is something that would be nice to have with RabbitMQ RPC (using direct reply), as we would need to set different routing keys per message then. Until we have fixed this, we could perhaps just set
queue_name
to an empty string, since it won't be used then.Todo
queue_name
argument optionalDefaultExchangePublisher
supports options in the#publish
method, as I only documented this for theTopicExchangePublisher
(both of those classes includes thePublisher
module, so their#publish
methods have the same functionality)