<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; ">I would like to use this feature as documented at <a href="http://www.rabbitmq.com/blog/2011/03">http://www.rabbitmq.com/blog/2011/03</a>/ and <a href="http://www.rabbitmq.com/extensions.html">http://www.rabbitmq.com/extensions.html</a></div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; "><br></div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; ">I tested both manually using the management console and with a coffeescript program but cannot make it work.</div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; "><br></div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; ">Of course it is possible – even probable – that I have an error in understanding… :)</div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; "><br></div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; ">My application is one where I would like to publish each message using multiple routing keys.</div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; "><br></div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; ">In general each subscriber will bind with one key.</div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; "><br></div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; ">Here is a test that fails both on my mac using RabbitMQ <span class="Apple-style-span" style="border-collapse: collapse; color: rgb(72, 72, 72); font-size: 12px; line-height: 17px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Verdana, sans-serif; ">2.7.1 / Erlang R15B and a linux box using </span>RabbitMQ <span class="Apple-style-span" style="border-collapse: collapse; color: rgb(72, 72, 72); font-size: 12px; line-height: 17px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Verdana, sans-serif; ">2.7.1 / Erlang R14B:</span></div><div><font class="Apple-style-span" color="#484848" face="Verdana,sans-serif"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 12px; line-height: 17px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Courier; "><br></span></font></div><div><font class="Apple-style-span" color="#484848" face="Verdana,sans-serif"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 12px; line-height: 17px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Courier; "># test.coffee</span></font></div><div><font class="Apple-style-span" color="#484848" face="Courier"><span class="Apple-style-span" style="border-collapse: collapse; line-height: 17px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><div style="font-size: 12px; "><div><div><div>amqp = require 'amqp'</div><div><br></div><div>t1_message = (message, headers, properties) -></div><div> console.log ""+</div><div> "\nSuccess: t1: message: #{JSON.stringify message}"+</div><div> "\nheaders: #{JSON.stringify headers}"+</div><div> "\nproperties: #{JSON.stringify properties, undefined, 4}"</div><div> </div><div> process.exit 0</div><div> </div><div>t0_message = (message, headers, properties) -></div><div> console.log ""+</div><div> "\nBroadcast: t0: message: #{JSON.stringify message}"+</div><div> "\nheaders: #{JSON.stringify headers}"+</div><div> "\nproperties: #{JSON.stringify properties, undefined, 4}"</div><div> </div><div>bailout = -> </div><div> console.log "\nFailure"</div><div> process.exit 1</div><div><br></div><div>amqp_connection = amqp.createConnection()</div><div><br></div><div>amqp_connection.on 'ready', () -> </div><div> properties = type:'topic', durable: true</div><div><br></div><div> amqp_connection.exchange "test", properties, (exchange) -></div><div> properties = durable:true, autoDelete:false</div><div><br></div><div> amqp_connection.queue "t1", properties, (queue) -></div><div> queue.bind exchange, "foo"</div><div> </div><div> queue.subscribe (message, headers, properties) -> </div><div> t1_message message, headers, properties</div><div><br></div><div> amqp_connection.queue "t0", properties, (queue) -></div><div> queue.bind exchange, "*"</div><div> </div><div> queue.subscribe (message, headers, properties) -> </div><div> t0_message message, headers, properties</div><div> </div><div> cc_header = cc:["foo","bar"]</div><div> properties = contentType:"application/json", headers:cc_header</div><div> message = test:"message content"</div><div> exchange.publish "whatever", message, properties</div><div> setTimeout bailout, 1000</div></div></div><div><br></div></div><div><span style="font-family: Calibri; ">Here's the output – if it had succeeded, both queues would have received the message:</span></div></span></font><span class="Apple-style-span" style="font-family: monospace; font-size: 12px; white-space: pre; "><div><span class="Apple-style-span" style="font-family: monospace; font-size: 12px; white-space: pre; "><br></span></div>Broadcast: t0: message: {"test":"message content"}</span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 12px; white-space: pre; ">headers: {"cc":{"0":"foo","1":"bar"}}</span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 12px; white-space: pre; ">properties: {</span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 12px; white-space: pre; "> "contentType": "application/json",</span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 12px; white-space: pre; "> "headers": {</span><span class="Apple-style-span" style="font-size: 12px; font-family: 'Lucida Grande'; "><pre style="word-wrap: break-word; "> "cc": {<br> "0": "foo",<br> "1": "bar"<br> }<br> },<br> "queue": "t0",<br> "deliveryTag": 1,<br> "redelivered": false,<br> "exchange": "test",<br> "routingKey": "whatever",<br> "consumerTag": "node-amqp-38169-0.10587440640665591"<br>}<br><br>Failure</pre></span></div></body></html>