Skip to content

Make the queue_name argument for DefaultExchangePublisher optional #105

@roback

Description

@roback

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions