Skip to content

Conversation

@mateuszsip
Copy link
Contributor

This is a follow-up to #210.

Currently setting multiple routing keys using xml configuration:

<queue-options> <name>test-queue</name> <routing-keys> <routing-key>foo</routing-key> <routing-key>bar</routing-key> </routing-keys> </queue-options>

Ends with:

[Symfony\Component\Config\Definition\Exception\InvalidTypeException] Invalid type for path "old_sound_rabbit_mq.consumers.test_consumer.queue_options.routing_keys.routing_key". Expected scalar, but got array. 

But works for single routing key, that is confusing:

<queue-options> <name>test-queue</name> <routing-keys> <routing-key>foo</routing-key> </routing-keys> </queue-options>

There is a solution mentioned in #197

<queue-options> <name>test-queue</name> <routing-keys> foo </routing-keys> <routing-keys> bar </routing-keys> </queue-options>

But it would be nice to use the same valid way that #210 introduced for routing keys.

After merge, configuration like this:

<queue-options> <name>test-queue</name> <routing-key>foo</routing-key> <routing-key>bar</routing-key> </queue-options>

Is valid and works as expected.

@stloyd stloyd merged commit d4d7226 into php-amqplib:master Jun 21, 2017
@stloyd
Copy link
Collaborator

stloyd commented Jun 21, 2017

Thanks @kejwmen !

@aosmialowski
Copy link

@stloyd can we have a tag, please? For our team, fixing this issue is quite crucial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants