In AMQP 1.0, transfers should not be made unless the receiving peer has granted credit. Using 3.6.16 of the 1.0 plugin, rabbitmq appears not to honour this.
To reproduce using the Apache Qpid proton python client, run the following against a queue containing messages ('examples' by default, so can use the simple_send.py example[1] to fill it up):
from __future__ import print_function
import optparse
from proton.handlers import MessagingHandler
from proton.reactor import Container
class Recv(MessagingHandler):
def __init__(self, url):
super(Recv, self).__init__(prefetch=0)
self.url = url
def on_start(self, event):
event.container.create_receiver(self.url)
def on_message(self, event):
print(event.message)
parser = optparse.OptionParser(usage="usage: %prog [options]")
parser.add_option("-a", "--address", default="localhost:5672/examples",
help="address from which messages are received (default %default)")
opts, args = parser.parse_args()
try:
Container(Recv(opts.address)).run()
except KeyboardInterrupt: pass
This should never receive any messages as it does not issue credit.
Using PN_TRACE_FRM=1 when running that you see the following trace (queue populated with simple_send.py -m 5:
As you can see, the client never send a flow performative, meaning no credit has been granted. The server therefore shoul not send transfer performatives.
In AMQP 1.0, transfers should not be made unless the receiving peer has granted credit. Using 3.6.16 of the 1.0 plugin, rabbitmq appears not to honour this.
To reproduce using the Apache Qpid proton python client, run the following against a queue containing messages ('examples' by default, so can use the simple_send.py example[1] to fill it up):
This should never receive any messages as it does not issue credit.
Using PN_TRACE_FRM=1 when running that you see the following trace (queue populated with simple_send.py -m 5:
As you can see, the client never send a flow performative, meaning no credit has been granted. The server therefore shoul not send transfer performatives.
[1] https://gitbox.apache.org/repos/asf?p=qpid-proton.git;a=blob;f=python/examples/simple_send.py;h=7717a16577c940e8fd9ad8650771f52f6e81ba8c;hb=HEAD