<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks.. It helped..<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Just wondering what is the maximum number of binding Rabbit MQ supports and also does that depend on the resources like ram, disk space, processes rabbit mq
 is running <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></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:rabbitmq-discuss-bounces@lists.rabbitmq.com]
<b>On Behalf Of </b>Gary Russell<br>
<b>Sent:</b> Tuesday, April 29, 2014 4:50 PM<br>
<b>To:</b> Discussions about RabbitMQ<br>
<b>Subject:</b> Re: [rabbitmq-discuss] dynamic binding<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">It looks like you are trying to modify an existing binding; I said...<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">><span style="font-size:9.5pt;font-family:"Arial","sans-serif"">add a second binding with the new header value(s)...</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:"Arial","sans-serif"">Just use admin.declareBinding(newBinding), </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:"Arial","sans-serif"">...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><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Tue, Apr 29, 2014 at 4:36 PM, PATAR, SAGAR <<a href="mailto:sp345s@att.com" target="_blank">sp345s@att.com</a>> wrote:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><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 ..</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:Consolas">Binding b = BindingBuilder.<i>bind</i>(q).to(e).with(binding.getRoutingKey()).and(bArgs);</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Below is the configuration context file …
</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:8.0pt;font-family:Consolas;color:#3F7F7F;background:yellow"><rabbit:connection-factory</span><span style="font-size:8.0pt;font-family:Consolas;background:yellow">
<span style="color:#7F007F">id</span>=<span style="color:#2A00FF">"connectionFactory"</span>
<span style="color:#7F007F">connection-factory</span>=<span style="color:#2A00FF">"cf"</span>
<span style="color:#7F007F">addresses</span>=<span style="color:#2A00FF">"${addresses}"</span>
<span style="color:#7F007F">channel-cache-size</span>=<span style="color:#2A00FF">"${session.size}"</span>
<span style="color:#3F7F7F">/></span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:8.0pt;font-family:Consolas;background:yellow">        <span style="color:#3F7F7F">
<rabbit:admin</span> <span style="color:#7F007F">id</span>=<span style="color:#2A00FF">"admin"</span>
<span style="color:#7F007F">connection-factory</span>=<span style="color:#2A00FF">"connectionFactory"</span>
<span style="color:#3F7F7F">/></span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:8.0pt;font-family:Consolas;background:yellow">        <span style="color:#3F5FBF">
<!-- Message Listener 1 ### Exchange -    --></span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:8.0pt;font-family:Consolas;background:yellow">        <span style="color:#3F7F7F">
<rabbit:queue</span> <span style="color:#7F007F">id</span>=<span style="color:#2A00FF">"queue1"</span>
<span style="color:#7F007F">name</span>=<span style="color:#2A00FF">"${username}.${jndiname1}.QUEUE"</span>
<span style="color:#7F007F">durable</span>=<span style="color:#2A00FF">"true"</span>
<span style="color:#7F007F">auto-delete</span>=<span style="color:#2A00FF">"false"</span>
<span style="color:#3F7F7F">/></span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:8.0pt;font-family:Consolas;color:#3F7F7F;background:yellow"><rabbit:headers-exchange</span><span style="font-size:8.0pt;font-family:Consolas;background:yellow">
<span style="color:#7F007F">name</span>=<span style="color:#2A00FF">"${jndiname1}"</span><span style="color:#3F7F7F">/></span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:8.0pt;font-family:Consolas;background:yellow">   <span style="color:#3F7F7F">
<bean</span> <span style="color:#7F007F">name</span>=<span style="color:#2A00FF">"binding1"</span> 
<span style="color:#7F007F">class</span>=<span style="color:#2A00FF">"org.springframework.amqp.rabbit.config.BindingFactoryBean"</span><span style="color:#3F7F7F">></span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:8.0pt;font-family:Consolas;background:yellow">        <span style="color:#3F7F7F">
<property</span> <span style="color:#7F007F">name</span>=<span style="color:#2A00FF">"exchange"</span>
<span style="color:#7F007F">value</span>=<span style="color:#2A00FF">"${jndiname1}"</span>
<span style="color:#3F7F7F">/></span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:8.0pt;font-family:Consolas;background:yellow">        <span style="color:#3F7F7F">
<property</span> <span style="color:#7F007F">name</span>=<span style="color:#2A00FF">"destinationQueue"</span>
<span style="color:#7F007F">ref</span>=<span style="color:#2A00FF">"queue1"</span>
<span style="color:#3F7F7F">/></span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:8.0pt;font-family:Consolas;background:yellow">               
<span style="color:#3F7F7F"><property</span> <span style="color:#7F007F">name</span>=<span style="color:#2A00FF">"arguments"</span><span style="color:#3F7F7F">></span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:8.0pt;font-family:Consolas;background:yellow">               
<span style="color:#3F7F7F"><util:map></span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:8.0pt;font-family:Consolas;background:yellow">                       
<span style="color:#3F7F7F"><entry</span> <span style="color:#7F007F">key</span>=<span style="color:#2A00FF">"x-match"</span>
<span style="color:#7F007F">value</span>=<span style="color:#2A00FF">"any"</span>
<span style="color:#3F7F7F">/></span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:8.0pt;font-family:Consolas;background:yellow">               
<span style="color:#3F7F7F"></util:map></span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:8.0pt;font-family:Consolas;background:yellow">        <span style="color:#3F7F7F">
</property></span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:8.0pt;font-family:Consolas;background:yellow">   <span style="color:#3F7F7F">
</bean></span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:8.0pt;font-family:Consolas;background:yellow">        <span style="color:#3F7F7F">
<bean</span> <span style="color:#7F007F">id</span>=<span style="color:#2A00FF">"listener1"</span>
<span style="color:#7F007F">class</span>=<span style="color:#2A00FF">"${listener1}"</span><span style="color:#3F7F7F">/></span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<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;background:yellow">
<span style="color:#7F007F">id</span>=<span style="color:#2A00FF">"dlListenerContainer"</span>
<span style="color:#7F007F">concurrency</span>=<span style="color:#2A00FF">"${listener.thread.size}"</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:8.0pt;font-family:Consolas;background:yellow">               
<span style="color:#7F007F">connection-factory</span>=<span style="color:#2A00FF">"connectionFactory"</span><span style="color:#3F7F7F">></span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:8.0pt;font-family:Consolas;background:yellow">               
<span style="color:#3F7F7F"><rabbit:listener</span> <span style="color:#7F007F">ref</span>=<span style="color:#2A00FF">"listener1"</span> 
<span style="color:#7F007F">queues</span>=<span style="color:#2A00FF">"queue1"</span>
<span style="color:#3F7F7F">/></span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:8.0pt;font-family:Consolas;background:yellow">        <span style="color:#3F7F7F">
</rabbit:listener-container></span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:Consolas">      
</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><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</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">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.<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Mon, Apr 28, 2014 at 11:01 AM, PATAR, SAGAR <<a href="mailto:sp345s@att.com" target="_blank">sp345s@att.com</a>> wrote:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">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.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Ex: message header “srcId” has values “1001,1002,1003,1004”<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">At runtime if the same listener bean has to listen to messages with message header “srcId” having value “2001,2002,2003” ..<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Is there a way to add these bindings dynamically at runtime ..??
<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#888888">Sagar</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;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><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</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">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><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>