Hi all,
<div><br></div><div>I got a strange situation with RabbitMQ 2.1.1, Mac OSX 10.6.5, erlang version : 5.8.1.1 (not sure if it is a bug): I was unable to store message into queue using Python clients.In fact, it is standard code I took from RabbitMQ site. So it is supposed to work. It already worked before. For me, yes. </div>
<div><br></div><div>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco;color:#1c39f6">import<span style="color:#000000"> </span><span style="text-decoration:underline;color:#000000">pika</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco;color:#1c39f6">import<span style="color:#000000"> </span><span style="text-decoration:underline;color:#000000">sys</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco"><span style="color:#1c39f6">import</span> <span style="text-decoration:underline">pickle</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco;color:#1c39f6">import<span style="color:#000000"> json</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco;min-height:15.0px"><br></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco">connection = pika.AsyncoreConnection(pika.ConnectionParameters(</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco"> host=<span style="color:#00b435">'127.0.0.1'</span>,</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco"> credentials=pika.PlainCredentials(<span style="color:#00b435">'guest'</span>, <span style="color:#00b435">'guest'</span>)))</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco">channel = connection.channel()</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco;min-height:15.0px"><br></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco">channel.queue_declare(queue=<span style="color:#00b435">'feeds'</span>, durable=<span style="color:#1c39f6">True</span>)</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco;min-height:15.0px"><br></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco;color:#00b435"><span style="color:#000000">message = json.dumps({</span>"import_feed"<span style="color:#000000">: </span>"<a href="http://cnn.com/rss/edition.rss" target="_blank">http://cnn.com/rss/edition.rss</a>"<span style="color:#000000">})</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco">channel.basic_publish(exchange=<span style="color:#00b435">''</span>, routing_key=<span style="color:#00b435">'importer'</span>,</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco"> body=message,</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco"> properties=pika.BasicProperties(</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco"> delivery_mode = <span style="color:#980d08">2</span>, <span style="color:#cbcbcb"># make message persistent</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco"> ))</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco;color:#00b435"><span style="color:#1c39f6">print</span><span style="color:#000000"> </span>" [x] Sent %r"<span style="color:#000000"> % (message,)</span></p>
</div><div><br></div><div>After running these code for several time, I checked with RabbitMQ to see if those message were stored in the queue</div>
<div><br></div><div><div>Dinh-Phams-MacBook-Pro:~ dinhpham$ sudo /Users/dinhpham/dev/rabbitmq_server-2.1.1/sbin/rabbitmqctl list_queues name messages_ready messages_unacknowledged</div><div>Listing queues ...</div><div>feeds<span style="white-space:pre-wrap">        </span>0<span style="white-space:pre-wrap">        </span>0</div>
<div>...done.</div></div><div><br></div><div>It meant that "feed" queue is created but no message is stored.</div><div><br></div><div>In fact, those code worked in the past. It suddenly refused to work after I had sent several hundred thousands of messages into the queue and deleted them all for new tests. After several deletion, RabbitMQ refused to work with the code. No message was stored or no queue was created at all (happened with Carrot Python client)</div>
<div><br></div><div>Anybody has experienced this case? Is there any log that I can look into to see what happened?</div><div><br></div><div>Thanks,</div><div><br></div><div><br></div><div>Dinh </div><div><br></div><div><br>
</div>