[ https://issues.apache.org/jira/browse/ARTEMIS-1898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16733146#comment-16733146 ]
Keith Wall commented on ARTEMIS-1898: ------------------------------------- I've been testing this change today both on master and the 2.6.x branch. I see circumstances when a pre-existing producer does not receive a flow perforative after the new consumer has drained the queue. I am testing with [~gsim]'s original reproducer. I have set <address-setting/> to max-size-bytes 100000 and address-full-policy FAIL and created an address/queue called myqueue with ANYCAST routing. I am running test_send.py and drain.py with environment variable PN_TRACE_FRM=true. h6. Working: {{python test_send.py --address '127.0.0.1:5672/myqueue' --messages=700}} then once the Broker has reported queue full: {{python drain.py --address '127.0.0.1:5672/myqueue' --messages=0}} On running drain.py , I see the test_send console log a incoming flow as credit is restored. (Note that test_send is not sophisticated enough to actually resend the rejected messages). [0x7fe3e7e3e2d0]:0 <- @flow(19) [next-incoming-id=700, incoming-window=2147483647, next-outgoing-id=1, outgoing-window=2147483647, handle=0, delivery-count=700, link-credit=1000] h6. Failing: If I repeat same test with a message count 699, the flow is not received by the producer. Turning on PN_TRACE_FRM on the Broker, I can confirm that the Broker does not emit the frame. It is as if the Broker's credit calculations are flawed. > [AMQP] sender is not granted credit once space on queue is available > -------------------------------------------------------------------- > > Key: ARTEMIS-1898 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1898 > Project: ActiveMQ Artemis > Issue Type: Bug > Reporter: Gordon Sim > Assignee: Andy Taylor > Priority: Major > Fix For: 2.6.4 > > Attachments: drain.py, test_send.py > > > If an AMQP publisher sends to a queue that is full, with > address-full-policy=FAIL, it gets messages rejected and no credit issued as > expected. However if the queue is then drained, that existing sender link is > not granted any more credit. > To reproduce, configure a broker such that it has a queue called examples > with some fairly low max size (I set global-max-size to 100kb) and > address-full-policy of FAIL. Then run attached test_send.py with args e.g. -m > 100000. The sender will eventually stall due to lack of credit. Then run the > attached drain.py which will drain the queue. This *should* allow the sender > to resume sending, but it does not. -- This message was sent by Atlassian JIRA (v7.6.3#76005)