Skip to content

Commit

Permalink
make the routingKey binding more flexible (comma separated list)
Browse files Browse the repository at this point in the history
  • Loading branch information
postwait committed Mar 21, 2012
1 parent 8a2fef6 commit 0be44ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/java/com/omniti/reconnoiter/broker/RabbitBroker.java
Expand Up @@ -146,9 +146,9 @@ public void connect() throws Exception {

returnedQueueName = channel.queueDeclare(queueName, durableQueue,
exclusiveQueue, autoDelete, null).getQueue();
channel.queueBind(returnedQueueName, exchangeName, routingKey);
if(!routingKey.equals(""))
channel.queueBind(returnedQueueName, exchangeName, "");
for (String rk : routingKey.split(",")) {
channel.queueBind(returnedQueueName, exchangeName, rk);
}
}
public Channel getChannel() { return channel; }

Expand Down
2 changes: 1 addition & 1 deletion src/stratcon.conf.in
Expand Up @@ -53,7 +53,7 @@
<hostname>mq1.int.circonus.net,mq2.int.circonus.net</hostname>
<exchange>noit.firehose</exchange>
<exchangetype>topic</exchangetype>
<routingkey>check</routingkey>
<routingkey>check,</routingkey>
<username>stratcon</username>
<password>youllneverguess</password>
</mq>
Expand Down

0 comments on commit 0be44ef

Please sign in to comment.