[rabbitmq-discuss] loop_forever() from paho-mqtt python client prevents rabbitmq from stopping

Sok Ann Yap sokann at gmail.com
Thu May 15 11:01:40 BST 2014


I just started playing with rabbitmq for a few days, mainly as a mqtt
broker. I noticed that as long as I have any active connection from a
paho-mqtt python client, then the rabbitmq process would just hang
forever following `rabbitmqctl stop <pid>`

Steps to reproduce (on debian/ubuntu):

1. Install rabbitmq-server version 3.3.1 following
http://www.rabbitmq.com/install-debian.html
2. As root, run `rabbitmq-plugins enable rabbitmq_mqtt;
/etc/init.d/rabbitmq-server restart` to enable the mqtt plugin
3. As root, run `easy_install paho-mqtt` to install paho-mqtt version 0.9
4. Copy the sample code from the "Getting Started" section of
https://pypi.python.org/pypi/paho-mqtt/0.9 as mqtt_test.py, replace
iot.eclipse.org with localhost
5. Run `python mqtt_test.py`, which will print "Connected with result
code 0" and then loop forever
6. As root, run `/etc/init.d/rabbitmq-server stop`

Attached is a sample log file. Step 5 happened on 09:33:28. Step 6
happened on 09:33:39. On 09:39:42, I went to the console running the
python script, and pressed Ctrl+C. The rabbitmq process was able to
stop following that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rabbit.log
Type: text/x-log
Size: 5847 bytes
Desc: not available
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140515/6ec0a1c0/attachment.bin>


More information about the rabbitmq-discuss mailing list