RamblingCookieMonster / PSRabbitMq

PowerShell module to send and receive messages from a RabbitMq server
http://ramblingcookiemonster.github.io/RabbitMQ-Intro/
MIT License
47 stars 29 forks source link

Bind queue with multiple keys when connecting to a channel for topic exchange routing #5

Closed gaelcolas closed 8 years ago

gaelcolas commented 8 years ago

When Connecting a channel using Connect-RabbitMQChannel, the Key parameter is a unique [string] value, and the queue binding is done only once:

Connect-RabbitMqChannel.ps1 line 113

$Channel.QueueBind($QueueName, $Exchange, $Key)

When using Topic exchange, a great feature is to have a queue with multiple bindings based on different key, to have multiple routing: http://www.rabbitmq.com/tutorials/tutorial-five-dotnet.html Although the extra bindings could be done later, I believe it would be nice to accept an array of keys, and bind for each routing key.

[edit]Was being dumb. Changing to [string[]] should be enough, will test tomorrow and create a new PR [/edit]