<div dir="ltr">We are doing ours statically through server automation scripts. The reasoning being we wanted more control over this, since we have remote systems to shovel to a central location. Due to the shoveling config (from what I'm seeing there's no way to auto-shovel ALL queues, each has to be defined), we limited the ability to create queues/exchanges/policies. That also puts more "conversation" and automation in the systems group on how messaging gets routed, handled, failover, etc. The option of using federated instead of shovels might work though I've not investigated how you could programatically create federated exchanges, know how to connect to remote systems with out more information than most applications have.<div>
<br></div><div>If all of your publishers/consumers were hitting the same set of rabbit nodes, I'd imagine it'd be a different situation than ours and having your application create the exchanges, queues and binding to them would be more workable. <br>
<div><br></div><div style>Jason</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 14, 2013 at 12:02 PM, 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"><div class="im">On 14/06/13 14:48, Dmitry Andrianov wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi guys.<br>
What is the best practices on who should create all the queues and<br>
exchanges?<br>
</blockquote>
<br></div>
Whichever works best for you :)<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I see the three options:<br>
1. consumer-app creates everything and it MUST be started before the<br>
producer-app<br>
</blockquote>
<br></div>
That's probably not ideal.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2. both consumer-app and producer-app create these objects on startup so<br>
it does not matter which one starts first.<br>
</blockquote>
<br></div>
This is probably closest to "the spirit" of AMQP. I think the expectation is that producers and consumers should declare the things that they directly interact with. So for example for pub-sub a producer would only declare the exchange it would publish to, and then consumers declare exchange, queue and binding.<div class="im">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
3. queues and exchanges are put into the broker configuration so they<br>
are created automatically when broker starts.<br>
</blockquote>
<br></div>
This keeps your apps free of the need to declare things - but it's only going to work if your configuration is quite static.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It looks to me that #3 would be the best way. The apps do not need to<br>
have any code which initialises stuff, user accounts<br>
applications use can be restricted etc.<br>
But I cannot find the "official" way of doing it.<br>
We tried using shovel plugin because it allows you to declare all these<br>
queues and exchanges to be created.<br>
It kind of works but it feels a bit dodgy.<br>
</blockquote>
<br></div>
You can do that - or use <a href="http://www.rabbitmq.com/management.html#load-definitions" target="_blank">http://www.rabbitmq.com/<u></u>management.html#load-<u></u>definitions</a><br>
<br>
Cheers, Simon<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Simon MacMullen<br>
RabbitMQ, Pivotal</font></span><div class="HOEnZb"><div class="h5"><br>
______________________________<u></u>_________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.<u></u>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>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Jason McIntosh<br><a href="http://mcintosh.poetshome.com/blog/">http://mcintosh.poetshome.com/blog/</a><br>573-424-7612
</div>