<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Advanced Messaging &amp; Routing with AMQP</title>
	<atom:link href="http://www.igvita.com/2009/10/08/advanced-messaging-routing-with-amqp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.igvita.com/2009/10/08/advanced-messaging-routing-with-amqp/</link>
	<description>A goal is a dream with a deadline.</description>
	<pubDate>Thu, 11 Mar 2010 20:12:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: RabbitMQ and AMQP in Ruby &#171; 4 Lines of Code</title>
		<link>http://www.igvita.com/2009/10/08/advanced-messaging-routing-with-amqp/comment-page-1/#comment-232317</link>
		<dc:creator>RabbitMQ and AMQP in Ruby &#171; 4 Lines of Code</dc:creator>
		<pubDate>Wed, 03 Mar 2010 19:51:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/?p=748#comment-232317</guid>
		<description>[...] 1, 2010 by 0x4a6f4672    Ilya Grigorik recently wrote a nice summary about message handling with AMQP. Here is another nice post about RabbitMQ with amqp from Rany Keddo, the author of the workling [...]</description>
		<content:encoded><![CDATA[<p>[...] 1, 2010 by 0&#215;4a6f4672    Ilya Grigorik recently wrote a nice summary about message handling with AMQP. Here is another nice post about RabbitMQ with amqp from Rany Keddo, the author of the workling [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2010-01-05 &#171; Donghai Ma</title>
		<link>http://www.igvita.com/2009/10/08/advanced-messaging-routing-with-amqp/comment-page-1/#comment-228075</link>
		<dc:creator>links for 2010-01-05 &#171; Donghai Ma</dc:creator>
		<pubDate>Wed, 06 Jan 2010 04:06:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/?p=748#comment-228075</guid>
		<description>[...] Advanced Messaging &amp; Routing with AMQP &#8211; igvita.com (tags: amqp messaging ruby rabbitmq xmpp programming queue rails tutorial) [...]</description>
		<content:encoded><![CDATA[<p>[...] Advanced Messaging &amp; Routing with AMQP &#8211; igvita.com (tags: amqp messaging ruby rabbitmq xmpp programming queue rails tutorial) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ruby &#38; WebSockets: TCP for the Browser - igvita.com</title>
		<link>http://www.igvita.com/2009/10/08/advanced-messaging-routing-with-amqp/comment-page-1/#comment-226716</link>
		<dc:creator>Ruby &#38; WebSockets: TCP for the Browser - igvita.com</dc:creator>
		<pubDate>Tue, 22 Dec 2009 16:39:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/?p=748#comment-226716</guid>
		<description>[...] TCP connection may prove to be inefficient. Likewise, if you require non-trivial routing then AMQP is a powerful tool, and there is little reason to reinvent the powerful presence model built into XMPP. Right tool for [...]</description>
		<content:encoded><![CDATA[<p>[...] TCP connection may prove to be inefficient. Likewise, if you require non-trivial routing then AMQP is a powerful tool, and there is little reason to reinvent the powerful presence model built into XMPP. Right tool for [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Consuming XMPP PubSub in Ruby - igvita.com</title>
		<link>http://www.igvita.com/2009/10/08/advanced-messaging-routing-with-amqp/comment-page-1/#comment-223041</link>
		<dc:creator>Consuming XMPP PubSub in Ruby - igvita.com</dc:creator>
		<pubDate>Tue, 10 Nov 2009 17:22:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/?p=748#comment-223041</guid>
		<description>[...] PubSub specification within XMPP, as defined in XEP-0060, is definitely not as flexible as that of AMQP, but it is often times enough to cover the most popular use cases. However, technical merits aside, [...]</description>
		<content:encoded><![CDATA[<p>[...] PubSub specification within XMPP, as defined in XEP-0060, is definitely not as flexible as that of AMQP, but it is often times enough to cover the most popular use cases. However, technical merits aside, [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2009/10/08/advanced-messaging-routing-with-amqp/comment-page-1/#comment-221311</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Tue, 20 Oct 2009 21:30:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/?p=748#comment-221311</guid>
		<description>Jim, Alexis, thanks for the clarifications - updated the post.</description>
		<content:encoded><![CDATA[<p>Jim, Alexis, thanks for the clarifications - updated the post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alexis</title>
		<link>http://www.igvita.com/2009/10/08/advanced-messaging-routing-with-amqp/comment-page-1/#comment-221251</link>
		<dc:creator>alexis</dc:creator>
		<pubDate>Tue, 20 Oct 2009 16:01:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/?p=748#comment-221251</guid>
		<description>Folks,

Re: Load balancing and round robin

Round-robin occurs on queues not exchanges.  This is because queues are stateful and exchanges are (usually) stateless.

Queues manage state, buffering it on behalf of both broker and consumers.  In this equation, they treat messages as resources to be 'managed' and queues themselves are shared resources by default.  So when you have *multiple* consumers on one queue, then they round robin i.e. each message is delivered to at most one consumer, and no consumer can see another consuer's messages.  This makes queues ideal for patterns like master/worker.  If you only have one consumer on one queue, then of course it will get all the messages form that queue.

On the other hand: all the standard Exchanges can be thought of as stateless - like routing tables.  They treat messages as values to be copied to any queue that is subscribed with the right pattern or "key".  You can do pubsub with any exchange.  Fanout is "one to all", basically broadcast, and Direct exchanges give you multicast.  Direct can be thought of as a restriction on fanout's broadcast model.  So for example if I have two queues bound to one direct exchange with the same key "ibm" then a message tagged "ibm" will be sent to both queues.

The same is true for Topic exchanges: for example if I have two queues bound to one topic exchange with the pattern "system.event" then a message tagged "system.event" will be sent to both queues.  This would also happen if one queue were bound with "system.event" and the other with a more general routing pattern such as "system.*".

You *could* imagine 'stateful' exchanges eg for last value caching. And, it would be good to have other kinds of exchanges such as anycast, and you could potentially define a 'round robin exchange', but both of these would be complex.  It is usually easier to push all the state management into the queues.

Cheers

alexis</description>
		<content:encoded><![CDATA[<p>Folks,</p>
<p>Re: Load balancing and round robin</p>
<p>Round-robin occurs on queues not exchanges.  This is because queues are stateful and exchanges are (usually) stateless.</p>
<p>Queues manage state, buffering it on behalf of both broker and consumers.  In this equation, they treat messages as resources to be &#8216;managed&#8217; and queues themselves are shared resources by default.  So when you have *multiple* consumers on one queue, then they round robin i.e. each message is delivered to at most one consumer, and no consumer can see another consuer&#8217;s messages.  This makes queues ideal for patterns like master/worker.  If you only have one consumer on one queue, then of course it will get all the messages form that queue.</p>
<p>On the other hand: all the standard Exchanges can be thought of as stateless - like routing tables.  They treat messages as values to be copied to any queue that is subscribed with the right pattern or &#8220;key&#8221;.  You can do pubsub with any exchange.  Fanout is &#8220;one to all&#8221;, basically broadcast, and Direct exchanges give you multicast.  Direct can be thought of as a restriction on fanout&#8217;s broadcast model.  So for example if I have two queues bound to one direct exchange with the same key &#8220;ibm&#8221; then a message tagged &#8220;ibm&#8221; will be sent to both queues.</p>
<p>The same is true for Topic exchanges: for example if I have two queues bound to one topic exchange with the pattern &#8220;system.event&#8221; then a message tagged &#8220;system.event&#8221; will be sent to both queues.  This would also happen if one queue were bound with &#8220;system.event&#8221; and the other with a more general routing pattern such as &#8220;system.*&#8221;.</p>
<p>You *could* imagine &#8217;stateful&#8217; exchanges eg for last value caching. And, it would be good to have other kinds of exchanges such as anycast, and you could potentially define a &#8217;round robin exchange&#8217;, but both of these would be complex.  It is usually easier to push all the state management into the queues.</p>
<p>Cheers</p>
<p>alexis</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alexis</title>
		<link>http://www.igvita.com/2009/10/08/advanced-messaging-routing-with-amqp/comment-page-1/#comment-221225</link>
		<dc:creator>alexis</dc:creator>
		<pubDate>Tue, 20 Oct 2009 12:45:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/?p=748#comment-221225</guid>
		<description>Jim, you are quite right.  Round-robin only happens when many consumers share one queue (where the state lives).  All exchanges can do pubsub, and support multiple routing models.

alexis</description>
		<content:encoded><![CDATA[<p>Jim, you are quite right.  Round-robin only happens when many consumers share one queue (where the state lives).  All exchanges can do pubsub, and support multiple routing models.</p>
<p>alexis</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Freundenbacher</title>
		<link>http://www.igvita.com/2009/10/08/advanced-messaging-routing-with-amqp/comment-page-1/#comment-221222</link>
		<dc:creator>Jim Freundenbacher</dc:creator>
		<pubDate>Tue, 20 Oct 2009 12:35:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/?p=748#comment-221222</guid>
		<description>Oh and the immediate flag isn't for missing queues but for missing subscribers on a queue.</description>
		<content:encoded><![CDATA[<p>Oh and the immediate flag isn&#8217;t for missing queues but for missing subscribers on a queue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Freundenbacher</title>
		<link>http://www.igvita.com/2009/10/08/advanced-messaging-routing-with-amqp/comment-page-1/#comment-221221</link>
		<dc:creator>Jim Freundenbacher</dc:creator>
		<pubDate>Tue, 20 Oct 2009 12:33:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/?p=748#comment-221221</guid>
		<description>At least for RabbitMQ i can say that "identically named queues load-balancing" doesn't work. One way around this might be topic exchanges with some kind of id-based routing. For consumer load-balancing shared queues with prefetch windows are the way to go.</description>
		<content:encoded><![CDATA[<p>At least for RabbitMQ i can say that &#8220;identically named queues load-balancing&#8221; doesn&#8217;t work. One way around this might be topic exchanges with some kind of id-based routing. For consumer load-balancing shared queues with prefetch windows are the way to go.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2009/10/08/advanced-messaging-routing-with-amqp/comment-page-1/#comment-220233</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Mon, 12 Oct 2009 13:29:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/?p=748#comment-220233</guid>
		<description>Thanks Matt, that's a fantastic resource, completely forgot about it!</description>
		<content:encoded><![CDATA[<p>Thanks Matt, that&#8217;s a fantastic resource, completely forgot about it!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
