[ 
https://issues.apache.org/jira/browse/QPID-7704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15923081#comment-15923081
 ] 

Rob Godfrey commented on QPID-7704:
-----------------------------------

So having looked at this, it doesn't appear to be an issue in the Java Broker, 
but possibly in the JMS client instead.  To start off with I found that if I 
changed the number of messages sent I could get more messages to arrive in the 
broker (e.g. if I sent 9000 the broker received 4096, if I sent 10000 I got 
5120 messages into the queue).

Then I turned on protocol level debugging and saw this...

{noformat}
2017-03-13 23:12:46,268 DEBUG [IO-/127.0.0.1:49435] (o.a.q.s.p.frame) - 
RECV[/127.0.0.1:49435|1] : 
Attach{name=qpid-jms:sender:ID:ba820261-32d3-4c23-a0d2-7adc2bd63db5:1:1:1:queue,handle=0,role=sender,sndSettleMode=unsettled,rcvSettleMode=first,source=Source{address=ID:ba820261-32d3-4c23-a0d2-7adc2bd63db5:1:1:1,durable=none,expiryPolicy=session-end,timeout=0,dynamic=false,outcomes=[amqp:accepted:list,
 amqp:rejected:list, amqp:released:list, 
amqp:modified:list]},target=Target{address=queue,durable=none,expiryPolicy=session-end,timeout=0,dynamic=false,capabilities=[queue]},incompleteUnsettled=false,initialDeliveryCount=0,desiredCapabilities=[DELAYED_DELIVERY]}
2017-03-13 23:12:46,273 DEBUG [IO-/127.0.0.1:49435] (o.a.q.s.p.frame) - 
SEND[/127.0.0.1:49435|1] : 
Attach{name=qpid-jms:sender:ID:ba820261-32d3-4c23-a0d2-7adc2bd63db5:1:1:1:queue,handle=0,role=receiver,sndSettleMode=unsettled,rcvSettleMode=first,source=Source{address=ID:ba820261-32d3-4c23-a0d2-7adc2bd63db5:1:1:1,durable=none,expiryPolicy=session-end,timeout=0,dynamic=false,outcomes=[amqp:accepted:list,
 amqp:rejected:list, amqp:released:list, 
amqp:modified:list]},target=Target{address=queue,dynamic=false,capabilities=[REJECT_UNROUTABLE,
 DELAYED_DELIVERY]},offeredCapabilities=[REJECT_UNROUTABLE, 
DELAYED_DELIVERY],properties={}}
2017-03-13 23:12:46,274 DEBUG [IO-/127.0.0.1:49435] (o.a.q.s.p.frame) - 
SEND[/127.0.0.1:49435|1] : 
Flow{nextIncomingId=1,incomingWindow=2048,nextOutgoingId=0,outgoingWindow=2048,handle=0,deliveryCount=0,linkCredit=20000,echo=false}
{noformat}
...
{noformat}
2017-03-13 23:12:50,315 DEBUG [IO-/127.0.0.1:49435] (o.a.q.s.p.frame) - 
RECV[/127.0.0.1:49435|1] : 
Transfer{handle=0,deliveryId=1023,deliveryTag=32e,messageFormat=0}
2017-03-13 23:12:50,315 DEBUG [IO-/127.0.0.1:49435] (o.a.q.s.p.frame) - 
SEND[/127.0.0.1:49435|1] : 
Disposition{role=receiver,first=1023,last=1023,settled=true,state=Accepted{}}
2017-03-13 23:12:50,315 DEBUG [IO-/127.0.0.1:49435] (o.a.q.s.p.frame) - 
SEND[/127.0.0.1:49435|1] : 
Flow{nextIncomingId=1025,incomingWindow=2048,nextOutgoingId=0,outgoingWindow=2048}
2017-03-13 23:12:50,315 DEBUG [IO-/127.0.0.1:49435] (o.a.q.s.p.frame) - 
RECV[/127.0.0.1:49435|1] : 
Transfer{handle=0,deliveryId=1024,deliveryTag=32f,messageFormat=0}
2017-03-13 23:12:50,316 DEBUG [IO-/127.0.0.1:49435] (o.a.q.s.p.frame) - 
SEND[/127.0.0.1:49435|1] : 
Disposition{role=receiver,first=1024,last=1024,settled=true,state=Accepted{}}
{noformat}
...
{noformat}
2017-03-13 23:12:52,253 DEBUG [IO-/127.0.0.1:49435] (o.a.q.s.p.frame) - 
RECV[/127.0.0.1:49435|1] : 
Transfer{handle=0,deliveryId=2046,deliveryTag=72d,messageFormat=0}
2017-03-13 23:12:52,254 DEBUG [IO-/127.0.0.1:49435] (o.a.q.s.p.frame) - 
SEND[/127.0.0.1:49435|1] : 
Disposition{role=receiver,first=2046,last=2046,settled=true,state=Accepted{}}
2017-03-13 23:12:52,254 DEBUG [IO-/127.0.0.1:49435] (o.a.q.s.p.frame) - 
RECV[/127.0.0.1:49435|1] : 
Transfer{handle=0,deliveryId=2047,deliveryTag=72e,messageFormat=0}
2017-03-13 23:12:52,254 DEBUG [IO-/127.0.0.1:49435] (o.a.q.s.p.frame) - 
SEND[/127.0.0.1:49435|1] : 
Disposition{role=receiver,first=2047,last=2047,settled=true,state=Accepted{}}
2017-03-13 23:12:52,254 DEBUG [IO-/127.0.0.1:49435] (o.a.q.s.p.frame) - 
SEND[/127.0.0.1:49435|1] : 
Flow{nextIncomingId=2049,incomingWindow=2048,nextOutgoingId=0,outgoingWindow=2048}
2017-03-13 23:12:52,254 DEBUG [IO-/127.0.0.1:49435] (o.a.q.s.p.frame) - 
RECV[/127.0.0.1:49435|0] : Close{}
2017-03-13 23:12:52,267 INFO  [IO-/127.0.0.1:49435] (q.m.c.close) - 
[con:14(admin@/127.0.0.1:49435/default)/ch:0] 
[con:14(admin@/127.0.0.1:49435/default)/ch:0] CHN-1003 : Close
{noformat}

So we see that the broker initially gives 2048 of session credit, then when it 
has received 1024 messages, it opens the window up again (incoming_window = 
2048, so it can send *another* 2048 frames on top of the 1024 it sent 
already)... then after it has received 2048 messages it opens up the window 
again...  However at that point the client simply closes the connection.

If, prior to doing the connection.close() you explicitly close the message 
producer, then the broker receives all the messages.

I'm going to move this JIRA over to the JMS client JIRA system so they can 
decide whether this is a bug, or working as designed :-).


> Unable to send more than 2048 messages (async + persistent)
> -----------------------------------------------------------
>
>                 Key: QPID-7704
>                 URL: https://issues.apache.org/jira/browse/QPID-7704
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: qpid-java-6.1.1
>            Reporter: Antonin Vyborny
>            Priority: Minor
>
> When I use jms.forceAsyncSend=True flag along with DeliveryMode.PERSISTENT I 
> am unable to receive more than 2048 messages in the queue. I am not receiving 
> any warning/error so from client it looks like all messages are sent, but 
> only 2048 messages are actually found in the queue.
> There is unfortunately nothing in the log either.
> Steps to reproduce: 
> 1) Use the Sender example (org.apache.qpid.jms.example.Sender)
> 2) Set the following in Sender class:
>     private static final int DEFAULT_COUNT = 3000;
>     private static final int DELIVERY_MODE = DeliveryMode.PERSISTENT;
> 3) Set async sending in jndi.properties:
>     amqp://localhost:5672?jms.forceAsyncSend=True
> 4) run the example...



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to