<div dir="ltr">Simon,<div><br></div><div>Ultimately, I got this to work by adding:</div><div><br></div><div>"apply-to":"exchanges"<br></div><div><br></div><div>to my profile definitions.</div><div><br></div>
<div><br></div><div>However, one issue you may want to know about. After reapplying my profile, I didn't see a reduction in links like I'd expect, despite the fact that the </div><div><br></div><div> In fact, even restarting the broker caused the broken state to remain.</div>
<div><br></div><div>In order to get this policy to take effect, I need to restart the brokers. Not sure if this is expected behavior or not.</div><div><br></div><div>Thanks,</div><div><br></div><div>Matt</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Tue, Jan 14, 2014 at 2:00 AM, Simon MacMullen <span dir="ltr"><<a href="mailto:simon@rabbitmq.com" target="_blank">simon@rabbitmq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Matt.<br>
<br>
Your policy applies to exchanges and queues with "skytap" in the name - that includes the internal queues. Since the policy includes "ha-mode" I'm assuming you want it to apply to both exchanges and queues - so you could (1) change the regex to "^skytap" (i.e. names have to start with skytap, not just contain it or (2) create a second policy to apply "ha-mode" to queues and set the current policy to apply to exchanges only.<br>
<br>
Note that as of 3.2.x policies can be set to apply to exchanges or queues or both: <a href="http://www.rabbitmq.com/parameters.html#policies" target="_blank">http://www.rabbitmq.com/<u></u>parameters.html#policies</a><br>
<br>
Cheers, Simon<div class="im"><br>
<br>
On 13/01/2014 23:49, Matt Pietrek wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Thanks Simon!<br>
<br>
I'm not sure how I manage to misconfigure my federation to include the<br>
internal queues.<br>
<br>
If it helps, here's what my Policies page shows for the federation:<br>
<br>
skytap-federation<br></div>
<<a href="http://tuk5r1mqvip1.mgt.integ.skytap.com:15672/#/policies/%2F/skytap-federation" target="_blank">http://tuk5r1mqvip1.mgt.<u></u>integ.skytap.com:15672/#/<u></u>policies/%2F/skytap-federation</a><u></u>><div class="im">
<br>
skytap all <br>
federation-upstream-set: all<br>
ha-mode: all<br>
<br>
0<br>
<br>
<br>
<br>
And her are the snippets of python code I use to set up federation:<br>
<br>
rabbitmq_invoke_http_api(<u></u>broker_host,<br>
'PUT',<br>
<br>
'/api/parameters/federation-<u></u>upstream/%%2f/upstream-%s' %<br>
(quote_plus(federated_broker))<u></u>,<br>
<br>
'{"value":{"uri":"amqp://%(<u></u>username)s:%(password)s@%(<u></u>host)s:%(port)s"}}'<br>
% (federated_settings))<br>
<br>
then,<br>
<br>
rabbitmq_invoke_http_api(<u></u>broker_host,<br>
'PUT',<br>
<br>
'/api/policies/%2f/skytap-<u></u>federation',<br>
'{"pattern":"skytap",<br>
"definition":{"federation-<u></u>upstream-set":"all","ha-mode":<u></u>"all"}}')<br>
<br>
<br>
<br>
Thanks again,<br>
<br>
Matt<br>
<br>
<br>
<br>
On Mon, Jan 13, 2014 at 10:21 AM, Simon MacMullen <<a href="mailto:simon@rabbitmq.com" target="_blank">simon@rabbitmq.com</a><br></div><div><div class="h5">
<mailto:<a href="mailto:simon@rabbitmq.com" target="_blank">simon@rabbitmq.com</a>>> wrote:<br>
<br>
Hi Matt.<br>
<br>
Federated exchanges declare queues for internal use. These are the<br>
queues with names beginning "federation: " which you have probably<br>
already seen.<br>
<br>
It looks like in your case those internal queues are themselves<br>
becoming federated. This is unlikely to be a useful thing.<br>
<br>
You should review your federation policies and make sure those<br>
queues are not included in them. If you don't intend to federate<br>
queues at all then the easiest way is to set the federation policy<br>
to only apply to exchanges.<br>
<br>
I'll also file a bug to prevent those queues from ever federating,<br>
regardless of policy...<br>
<br>
Cheers, Simon<br>
<br>
<br>
On 13/01/2014 18:08, Matt Pietrek wrote:<br>
<br>
We have a bi-directional federation setup between three nodes<br>
like this<br>
on RabbitMQ 3.2.2:<br>
<br>
mq_integ/sea <===> mq_integ <===> mq_integ/tuk<br>
<br>
<br>
All three nodes use a "skytap" exchange and the mq_integ/sea<br>
and mq_integ/tuk are *_not_* federated with each other<br>
<br>
Here's what's interesting. In the *mq_integ/sea* broker, the<br>
"Federation<br>
<br>
Upstreams" page is what I'd expect it to be, that is, a<br>
connection to<br>
mq_integ:<br>
Name URI Expiry Message TTL Max Hops Prefetch<br>
Count Reconnect Delay<br>
Ack mode Trust User-ID<br>
upstream-integ<br></div></div>
<<a href="http://tuk5r1mq1.mgt.integ." target="_blank">http://tuk5r1mq1.mgt.integ.</a>__<a href="http://skytap.com:15672/#/federation-__upstreams/%2F/upstream-integ" target="_blank"><u></u>skytap.com:15672/#/federation-<u></u>__upstreams/%2F/upstream-integ</a><div>
<div class="h5"><br>
<<a href="http://tuk5r1mq1.mgt.integ.skytap.com:15672/#/federation-upstreams/%2F/upstream-integ" target="_blank">http://tuk5r1mq1.mgt.integ.<u></u>skytap.com:15672/#/federation-<u></u>upstreams/%2F/upstream-integ</a>>><br>
<br>
amqp://foo:bar@sea_m2:5672<br>
? ?<br>
<br>
<br>
However, in the "Federation Status" page for *mq_integ/sea* looks<br>
<br>
strange (see below). In particular, I see four entries, whereas in<br>
RabbitMQ 3.0.2 I only saw one line.<br>
<br>
In addition, the third entry references the mq_integ/tuk broker,<br>
even<br>
though I haven't configured mq_integ/sea to know anything about<br>
mq_integ/tuk:<br>
<br>
<br>
Connection URI Exchange / Queue Node State<br>
Inbound message rate Last<br>
changed<br>
upstream-integ amqp://sea_m2:5672 federation: skytap -><br>
mq_integ_queue<br>
<br>
rabbit@sea_r2<br>
running<br>
2014-01-11 1:35:28<br>
upstream-integ amqp://sea5_m2:5672 federation: skytap -><br>
mq_integ/sea_queue rabbit@sea_r2<br>
running<br>
2014-01-11 1:35:28<br>
upstream-integ amqp://sea_m2:5672 federation: skytap -><br>
mq_integ/tuk_queue rabbit@sea_r2<br>
running<br>
2014-01-11 1:35:29<br>
upstream-integ amqp://sea_m2:5672 skytap_exchange<br>
rabbit@sea_r2<br>
running<br>
0.00/s 2014-01-11 1:35:29<br>
<br>
<br>
Is this what you'd expect to see? Am I not understanding something?<br>
<br>
Thanks,<br>
<br>
Matt<br>
<br>
<br></div></div>
______________________________<u></u>___________________<br>
rabbitmq-discuss mailing list<br>
rabbitmq-discuss@lists.__<a href="http://rabbitmq.com" target="_blank">rabbi<u></u>tmq.com</a><br>
<mailto:<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@<u></u>lists.rabbitmq.com</a>><br>
<a href="https://lists.rabbitmq.com/__cgi-bin/mailman/listinfo/__rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/__<u></u>cgi-bin/mailman/listinfo/__<u></u>rabbitmq-discuss</a><br>
<<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/<u></u>cgi-bin/mailman/listinfo/<u></u>rabbitmq-discuss</a>><br>
<br>
<br>
<br>
</blockquote>
<br>
</blockquote></div><br></div>