[ https://issues.apache.org/jira/browse/QPID-6462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14378808#comment-14378808 ]
Rob Godfrey commented on QPID-6462: ----------------------------------- So the reason the listening fails is that calling receive from within the arrival listener doesn't really work... or rather it will only work where the message is small enough to fit into a single transfer frame. What the arrival listener is doing is providing a mechanism to inform another thread that "hey - stuff has arrived", but crucially it isn't saying that all the data for the message has arrived yet. Moreover that thread that the listener is being called from is used to process frame arrival, so if you block in that thread then you won't be receiving any more data. If you look at the code for Receiver.receive(), what it does is read the incoming transfer frames... and if all of the message hasn't arrived yet, then it blocks waiting for the rest of the message to arrive. This is fine *as long as you are not in the arrival processing thread*. If you want to use listening then you'll need to set up a separate thread to call receive in, and have your message listener simply poke that thread to call receive. This is essentially what the JMS layer does. > A message larger than 32732 bytes cannot be received under various > circumstances > -------------------------------------------------------------------------------- > > Key: QPID-6462 > URL: https://issues.apache.org/jira/browse/QPID-6462 > Project: Qpid > Issue Type: Bug > Components: Java Client > Affects Versions: 0.32 > Reporter: Mark Soderquist > Priority: Critical > Attachments: AmqpMessageSizeIssue.zip > > > A message larger than 32732 bytes (exactly 36 bytes smaller than 2^15 = > * 32768) cannot be received under various circumstances. Here is a matrix > that shows the conditions and outcomes: > Polling with AmqpValue section: Works > Polling with Data section: Fails > Listening with AmqpValue section: Fails > Listening with AmqpValue section: Fails > Attached is sample code to demonstrate. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org