[rabbitmq-discuss] Federation help
Simon MacMullen
simon at rabbitmq.com
Mon Dec 12 12:24:18 GMT 2011
You could either
1) Not enable federation on non federated servers. Declare the exchange
as type x-federation. If the connection closes with 503 COMMAND_INVALID
back, then reestablish the connection and declare as direct (or whatever).
2) Enable the federation plugin on all nodes, and configure the ones you
don't want to *really* federate with empty upstream_sets.
I would go for 2) personally.
Cheers, Simon
On 11/12/11 17:11, James Aimonetti wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Simon,
>
> Not to be a bother or anything, but have you thought more about how to
> handle the case where an application won't necessarily know if the
> broker is using federation or not, and how the application can properly
> declare the exchange?
>
> We unfortunately can't ensure the exchanges are properly declared on
> startup, so the application makes a point to declare them on init. If I
> can declare it as federated and have the broker kick back an easily
> parse-able error indicating to not use the federation exchange type, and
> redeclare using the vanilla declaration, that would get me most of the
> way there.
>
> Happy holidays,
>
> James
>
>
> On 11/29/2011 03:01 AM, Simon MacMullen wrote:
>> On 28/11/11 19:17, James Aimonetti wrote:
>>> My app will be running in environments that aren't necessarily
>>> federated, which is why I have my app declaring the exchanges on
>>> startup. Do you have recommendations for how to handle this? If
>>> federation is not enabled, and i declare the exchange as
>>> 'x-federation' with type='direct' in the args, will RabbitMQ know to
>>> declare the exchange as direct and not federated?
>>
>> Ah, no.
>>
>> Probably the best thing to do is require the federation plugin to always
>> be installed, and in the non-federated environments declare your
>> upstream_set(s) empty. This does require a bit of configuration on the
>> non-federated environments though. I'll have a think about whether this
>> can be improved.
>>
>>> As for the amqp_client/ERL_LIBS issue, I installed via tarball. Not
>>> sure why starting up didn't have plugins/ in the code path. I'll
>>> check the installed Erlang lib and see if a conflicting version made
>>> it in there.
>>
>> Thanks.
>>
>> Cheers, Simon
>>
>
>
> - --
> James Aimonetti
> Distributed Systems Engineer / DJ MC_
>
> 2600hz | http://2600hz.com
> sip:james at 2600hz.com
> tel: 415.886.7905
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQEcBAEBAgAGBQJO5ORaAAoJENc77s1OYoGgVdIH/1IEHp7dZNQ73BF31tL86Iw3
> b507jpGkBajr4l2tizTVyF1j93FRl75bI2WDgSyb52DRXJs4eQcuJy7Csu2olM9l
> 873T60tHSa0t0ID7PI4xJ55X6YdkL63sf4h6zUgq6jQMCbNl2GA2x6aBLNNA06YE
> WqiKoOM2Lyh2p9zPZs63h9zbl4aLdeITESvCzDTh7YiVXXYMeV6mgeYX5by+LonQ
> vhc8O8xoGH3cMYzKWDMcuxTFsEe6urMFevEIxIKNWsj7G9s/pH7YgfjoRiQmmkZS
> FyFrsK+mcYDsHRB5P/nJtiMc9C34Qp+wdW/y/vAlrtEAmZ4Bj2qYwCCw0Ov7dj8=
> =GyBb
> -----END PGP SIGNATURE-----
--
Simon MacMullen
RabbitMQ, VMware
More information about the rabbitmq-discuss
mailing list