[rabbitmq-discuss] Federation help
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.
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,
> 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.
>> 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/
> -----END PGP SIGNATURE-----
More information about the rabbitmq-discuss