<div dir="ltr">It looks like you are trying to modify an existing binding; I said...<div><br></div><div>><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">add a second binding with the new header value(s)...</span></div>
<div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">Just use admin.declareBinding(newBinding), </span></div>
<div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">...ending up with 2 bindings on the exchange, with the initial binding having the 1xxx matches and the new binding having the 2xxx matches.</span><br>
</div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br>
</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 29, 2014 at 4:36 PM, PATAR, SAGAR <span dir="ltr"><<a href="mailto:sp345s@att.com" target="_blank">sp345s@att.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I am using the below code and it is creating the binding object BUT is NOT reflecting on the admin console.. Attaching the src and context file for reference
 ..<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas">Binding b = BindingBuilder.<i>bind</i>(q).to(e).with(binding.getRoutingKey()).and(bArgs);<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Below is the configuration context file …
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow"><rabbit:connection-factory</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">id</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"connectionFactory"</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">connection-factory</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"cf"</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">addresses</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"${addresses}"</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">channel-cache-size</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"${session.size}"</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow">/></span><span style="font-size:8.0pt;font-family:Consolas;background:yellow"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="background:yellow;font-size:8.0pt;font-family:Consolas">       
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow"><rabbit:admin</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">id</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"admin"</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">connection-factory</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"connectionFactory"</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow">/></span><span style="font-size:8.0pt;font-family:Consolas;background:yellow"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="background:yellow;font-size:8.0pt;font-family:Consolas">       
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f5fbf;background:yellow"><!-- Message Listener 1 ### Exchange -    --></span><span style="font-size:8.0pt;font-family:Consolas;background:yellow"><u></u><u></u></span></p>

<p class="MsoNormal" style="text-autospace:none"><span style="background:yellow;font-size:8.0pt;font-family:Consolas">       
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow"><rabbit:queue</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">id</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"queue1"</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">name</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"${username}.${jndiname1}.QUEUE"</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">durable</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"true"</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">auto-delete</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"false"</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow">/></span><span style="font-size:8.0pt;font-family:Consolas;background:yellow"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="background:yellow;font-size:8.0pt;font-family:Consolas"></span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow"><rabbit:headers-exchange</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">name</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"${jndiname1}"</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow">/></span><span style="font-size:8.0pt;font-family:Consolas;background:yellow"><u></u><u></u></span></p>

<p class="MsoNormal" style="text-autospace:none"><span style="background:yellow;font-size:8.0pt;font-family:Consolas">  
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow"><bean</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">name</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"binding1"</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas"> 
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">class</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"org.springframework.amqp.rabbit.config.BindingFactoryBean"</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow">></span><span style="font-size:8.0pt;font-family:Consolas;background:yellow"><u></u><u></u></span></p>

<p class="MsoNormal" style="text-autospace:none"><span style="background:yellow;font-size:8.0pt;font-family:Consolas">       
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow"><property</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">name</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"exchange"</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">value</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"${jndiname1}"</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow">/></span><span style="font-size:8.0pt;font-family:Consolas;background:yellow"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="background:yellow;font-size:8.0pt;font-family:Consolas">       
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow"><property</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">name</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"destinationQueue"</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">ref</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"queue1"</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow">/></span><span style="font-size:8.0pt;font-family:Consolas;background:yellow"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="background:yellow;font-size:8.0pt;font-family:Consolas">               
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow"><property</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">name</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"arguments"</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow">></span><span style="font-size:8.0pt;font-family:Consolas;background:yellow"><u></u><u></u></span></p>

<p class="MsoNormal" style="text-autospace:none"><span style="background:yellow;font-size:8.0pt;font-family:Consolas">               
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow"><util:map></span><span style="font-size:8.0pt;font-family:Consolas;background:yellow"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="background:yellow;font-size:8.0pt;font-family:Consolas">                       
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow"><entry</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">key</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"x-match"</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">value</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"any"</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow">/></span><span style="font-size:8.0pt;font-family:Consolas;background:yellow"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="background:yellow;font-size:8.0pt;font-family:Consolas">               
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow"></util:map></span><span style="font-size:8.0pt;font-family:Consolas;background:yellow"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="background:yellow;font-size:8.0pt;font-family:Consolas">       
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow"></property></span><span style="font-size:8.0pt;font-family:Consolas;background:yellow"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="background:yellow;font-size:8.0pt;font-family:Consolas">  
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow"></bean></span><span style="font-size:8.0pt;font-family:Consolas;background:yellow"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="background:yellow;font-size:8.0pt;font-family:Consolas">       
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow"><bean</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">id</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"listener1"</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">class</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"${listener1}"</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow">/></span><span style="font-size:8.0pt;font-family:Consolas;background:yellow"><u></u><u></u></span></p>

<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow"><rabbit:listener-container</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">id</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"dlListenerContainer"</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">concurrency</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"${listener.thread.size}"</span><span style="font-size:8.0pt;font-family:Consolas;background:yellow"><u></u><u></u></span></p>

<p class="MsoNormal" style="text-autospace:none"><span style="background:yellow;font-size:8.0pt;font-family:Consolas">               
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">connection-factory</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"connectionFactory"</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow">></span><span style="font-size:8.0pt;font-family:Consolas;background:yellow"><u></u><u></u></span></p>

<p class="MsoNormal" style="text-autospace:none"><span style="background:yellow;font-size:8.0pt;font-family:Consolas">               
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow"><rabbit:listener</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">ref</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"listener1"</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas"> 
</span><span style="font-size:8.0pt;font-family:Consolas;color:#7f007f;background:yellow">queues</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">=</span><span style="font-size:8.0pt;font-family:Consolas;color:#2a00ff;background:yellow">"queue1"</span><span style="background:yellow;font-size:8.0pt;font-family:Consolas">
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow">/></span><span style="font-size:8.0pt;font-family:Consolas;background:yellow"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="background:yellow;font-size:8.0pt;font-family:Consolas">       
</span><span style="font-size:8.0pt;font-family:Consolas;color:#3f7f7f;background:yellow"></rabbit:listener-container></span><span style="font-size:8.0pt;font-family:Consolas"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas">      
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> rabbitmq-discuss [mailto:<a href="mailto:rabbitmq-discuss-bounces@lists.rabbitmq.com" target="_blank">rabbitmq-discuss-bounces@lists.rabbitmq.com</a>]
<b>On Behalf Of </b>Gary Russell<br>
<b>Sent:</b> Monday, April 28, 2014 12:09 PM<br>
<b>To:</b> Discussions about RabbitMQ<br>
<b>Subject:</b> Re: [rabbitmq-discuss] dynamic binding<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Yes; just add a second binding with the new header value(s); no need to do anything on the listener - it's all a function of the rabbitmq-server.<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Mon, Apr 28, 2014 at 11:01 AM, PATAR, SAGAR <<a href="mailto:sp345s@att.com" target="_blank">sp345s@att.com</a>> wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">We are using header exchanges and are using spring-rabbit mq for configuration and binding listeners to listen to specific messages with specific message header values.<u></u><u></u></p>
<p class="MsoNormal">Ex: message header “srcId” has values “1001,1002,1003,1004”<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">At runtime if the same listener bean has to listen to messages with message header “srcId” having value “2001,2002,2003” ..<u></u><u></u></p>
<p class="MsoNormal">Is there a way to add these bindings dynamically at runtime ..??
<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Thanks<u></u><u></u></p>
<p class="MsoNormal"><span style="color:#888888">Sagar<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>

<br>_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
<br></blockquote></div><br></div>