<?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: Mozilla Pulse and RabbitMQ</title>
	<atom:link href="http://christian.legnitto.com/blog/2010/07/17/mozilla-pulse-and-rabbitmq/feed/" rel="self" type="application/rss+xml" />
	<link>http://christian.legnitto.com/blog/2010/07/17/mozilla-pulse-and-rabbitmq/</link>
	<description>Christian Legnitto&#039;s blog about Mozilla, Apple, technology, and random stuff</description>
	<lastBuildDate>Fri, 07 Oct 2011 22:08:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Matthew Sackman</title>
		<link>http://christian.legnitto.com/blog/2010/07/17/mozilla-pulse-and-rabbitmq/comment-page-1/#comment-272</link>
		<dc:creator>Matthew Sackman</dc:creator>
		<pubDate>Sat, 17 Jul 2010 23:08:33 +0000</pubDate>
		<guid isPermaLink="false">http://christian.legnitto.com/blog/?p=70#comment-272</guid>
		<description>Hi Christian,

The new persister branch is regularly merged into from the current default branch. Whilst it is correct to say it is currently based off the 1.8 release, that&#039;s only true in the sense of the above. The new persister stores messages in a completely different format from the old, and there is currently no tool to allow upgrading from a released version of Rabbit to the new persister without losing persistent messages.

The issue you ran into when going 1.7 to 1.8 is subtly different. Whilst both use the old persister, both the on-disk format of the messages when they are written to disk, and a database schema changed, again, resulting in no state-maintaining upgrade path. To date we have never produced a tool which can do upgrades maintaining state when database schema or on-disk formats have changed.

You talk about users creating queues. I think that what you want is for all users to use queues which have server-generated names, thus you guarantee they are private, and you want to declare them &quot;exclusive&quot;, which means that when the connection that created the queue disappears, the queue itself (and any bindings to the queue) also automatically get deleted.

I quote this text from http://www.rabbitmq.com/admin-guide.html#access-control:

&quot;Some AMQP operations can create resources with server-generated names. Every user has configure, write and read permissions for such resources. However, the names are strong and not discoverable as part of the protocol, only through management functionality. Therefore these resources are in effect private to the user unless they choose to dilvuge their names to other users.&quot;

Thus I think that if you force users to create server-named queues, you don&#039;t need to grant any privileges to your public user. It&#039;ll need read access to the exchange to create the binding, and it should automatically have write access to create the binding to the private queues. If this doesn&#039;t work please let us know.

The 1.8 semantic changes concern what happens when you *re*declare a queue. Previously, if the queue already existed and you redeclare it, but with different attributes, it would still come back with an OK result. This is misleading because it could lead the user to think that a queue had been created with the specified attributes when in fact it has not. Thus now, you must ensure you redeclare with the same attributes otherwise the redeclaration will fail and close the channel. Full details can be found in the lower half of http://lists.rabbitmq.com/pipermail/rabbitmq-announce/2010-June/000025.html

I am very curious about you managing to get the new persister to crash. I&#039;ve been on holiday for the last week and have not caught up with the rabbitmq-discuss mailing list since getting back, so I have no idea whether you&#039;ve posted everything there too. If not, I&#039;d request you do so, and ideally include the various rabbit logs showing the crash - the new persister just *should not* crash.

One thing that might be happening is that Rabbit is raising flow control, to request that publishers stop sending further messages to Rabbit - even with the new persister this can happen sometimes to allow disks to catch up, but this tends to only be necessary at high data rates. The client must respond with a flow_ok message to the broker to confirm it understands the flow control, and it must then not send any further messages - this is usually handled by the AMQP client library as it just makes any subsequent publishes block - until it receives a further flow control message from the broker, informing it it can resume. Now I notice you&#039;re using a python client, and they have historically not supported flow control, which can lead to Rabbit forcibly disconnecting clients that do not respond appropriately to the flow control messages.

You have a very interesting use case, and there is absolutely nothing about it that shouldn&#039;t work perfectly well with RabbitMQ. I&#039;ll try and catch up with the mailing list early next week but in the mean time, please try and dig through the logs, if you&#039;ve not already done so, to see if you can find some sort of stack trace with the crash in it, if it&#039;s there at all, or whether it&#039;s some other issue.</description>
		<content:encoded><![CDATA[<p>Hi Christian,</p>
<p>The new persister branch is regularly merged into from the current default branch. Whilst it is correct to say it is currently based off the 1.8 release, that&#8217;s only true in the sense of the above. The new persister stores messages in a completely different format from the old, and there is currently no tool to allow upgrading from a released version of Rabbit to the new persister without losing persistent messages.</p>
<p>The issue you ran into when going 1.7 to 1.8 is subtly different. Whilst both use the old persister, both the on-disk format of the messages when they are written to disk, and a database schema changed, again, resulting in no state-maintaining upgrade path. To date we have never produced a tool which can do upgrades maintaining state when database schema or on-disk formats have changed.</p>
<p>You talk about users creating queues. I think that what you want is for all users to use queues which have server-generated names, thus you guarantee they are private, and you want to declare them &#8220;exclusive&#8221;, which means that when the connection that created the queue disappears, the queue itself (and any bindings to the queue) also automatically get deleted.</p>
<p>I quote this text from <a href="http://www.rabbitmq.com/admin-guide.html#access-control" rel="nofollow">http://www.rabbitmq.com/admin-guide.html#access-control</a>:</p>
<p>&#8220;Some AMQP operations can create resources with server-generated names. Every user has configure, write and read permissions for such resources. However, the names are strong and not discoverable as part of the protocol, only through management functionality. Therefore these resources are in effect private to the user unless they choose to dilvuge their names to other users.&#8221;</p>
<p>Thus I think that if you force users to create server-named queues, you don&#8217;t need to grant any privileges to your public user. It&#8217;ll need read access to the exchange to create the binding, and it should automatically have write access to create the binding to the private queues. If this doesn&#8217;t work please let us know.</p>
<p>The 1.8 semantic changes concern what happens when you *re*declare a queue. Previously, if the queue already existed and you redeclare it, but with different attributes, it would still come back with an OK result. This is misleading because it could lead the user to think that a queue had been created with the specified attributes when in fact it has not. Thus now, you must ensure you redeclare with the same attributes otherwise the redeclaration will fail and close the channel. Full details can be found in the lower half of <a href="http://lists.rabbitmq.com/pipermail/rabbitmq-announce/2010-June/000025.html" rel="nofollow">http://lists.rabbitmq.com/pipermail/rabbitmq-announce/2010-June/000025.html</a></p>
<p>I am very curious about you managing to get the new persister to crash. I&#8217;ve been on holiday for the last week and have not caught up with the rabbitmq-discuss mailing list since getting back, so I have no idea whether you&#8217;ve posted everything there too. If not, I&#8217;d request you do so, and ideally include the various rabbit logs showing the crash &#8211; the new persister just *should not* crash.</p>
<p>One thing that might be happening is that Rabbit is raising flow control, to request that publishers stop sending further messages to Rabbit &#8211; even with the new persister this can happen sometimes to allow disks to catch up, but this tends to only be necessary at high data rates. The client must respond with a flow_ok message to the broker to confirm it understands the flow control, and it must then not send any further messages &#8211; this is usually handled by the AMQP client library as it just makes any subsequent publishes block &#8211; until it receives a further flow control message from the broker, informing it it can resume. Now I notice you&#8217;re using a python client, and they have historically not supported flow control, which can lead to Rabbit forcibly disconnecting clients that do not respond appropriately to the flow control messages.</p>
<p>You have a very interesting use case, and there is absolutely nothing about it that shouldn&#8217;t work perfectly well with RabbitMQ. I&#8217;ll try and catch up with the mailing list early next week but in the mean time, please try and dig through the logs, if you&#8217;ve not already done so, to see if you can find some sort of stack trace with the crash in it, if it&#8217;s there at all, or whether it&#8217;s some other issue.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

