Package: python-pika
Version: 0.9.5-1
Severity: normal
Hello,
if I have a BlockingConnection-based sender that just sends:
#!/usr/bin/python
import pika
import time
credentials = pika.credentials.PlainCredentials('guest', 'guest')
parameters = pika.ConnectionParameters(
host="localhost",
credentials=credentials,
virtual_host="/")
connection = pika.BlockingConnection(parameters)
channel = connection.channel()
while True:
print "sending..."
channel.basic_publish(
exchange="",
body="test",
routing_key="",
properties=pika.BasicProperties(
content_type="text/plain",
delivery_mode=2))
time.sleep(1)
...and I shut down the server while it runs, it will never realise and
just keep sending happily:
$ ./dumb-sender
sending...
sending...
sending...
sending...
sending...
***** /etc/init.d/rabbitmq-server stop *****
sending...
sending...
sending...
sending...
sending...
/usr/lib/python2.7/dist-packages/pika/connection.py:642: UserWarning: Pika:
Write buffer exceeded warning threshold at 223 bytes and an estimated 10 frames
behind
warn(message % (self.outbound_buffer.size, est_frames_behind))
/usr/lib/python2.7/dist-packages/pika/connection.py:642: UserWarning: Pika:
Write buffer exceeded warning threshold at 235 bytes and an estimated 10 frames
behind
warn(message % (self.outbound_buffer.size, est_frames_behind))
sending...
***** /etc/init.d/rabbitmq-server start *****
/usr/lib/python2.7/dist-packages/pika/connection.py:642: UserWarning: Pika:
Write buffer exceeded warning threshold at 252 bytes and an estimated 11 frames
behind
warn(message % (self.outbound_buffer.size, est_frames_behind))
/usr/lib/python2.7/dist-packages/pika/connection.py:642: UserWarning: Pika:
Write buffer exceeded warning threshold at 286 bytes and an estimated 13 frames
behind
warn(message % (self.outbound_buffer.size, est_frames_behind))
/usr/lib/python2.7/dist-packages/pika/connection.py:642: UserWarning: Pika:
Write buffer exceeded warning threshold at 298 bytes and an estimated 13 frames
behind
warn(message % (self.outbound_buffer.size, est_frames_behind))
sending...
Note that it will just enqueue data and never send it out nor raise an
error.
This is rather an issue: simple scripts will not realise that their
messages have not been sent at all, and will happily pretend a
successful delivery to a dead broker (!!)
I'll now proceed to reimplement everything I have done in the last two
days using the asynchronous interface, and see if it works better :-/
Best regards,
Enrico
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 3.1.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages python-pika depends on:
ii python 2.7.2-9
ii python2.6 2.6.7-4
ii python2.7 2.7.2-7
python-pika recommends no packages.
python-pika suggests no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]