twingly / twingly-amqp

:bus: Ruby gem for RabbitMQ subscribing and publishing
0 stars 0 forks source link

Make the queue_name argument for DefaultExchangePublisher optional #105

Open roback opened 9 months ago

roback commented 9 months ago

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