[ https://issues.apache.org/jira/browse/AMQ-8464?focusedWorklogId=883111&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-883111 ]
ASF GitHub Bot logged work on AMQ-8464: --------------------------------------- Author: ASF GitHub Bot Created on: 03/Oct/23 13:05 Start Date: 03/Oct/23 13:05 Worklog Time Spent: 10m Work Description: cshannon commented on code in PR #1046: URL: https://github.com/apache/activemq/pull/1046#discussion_r1344072868 ########## activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java: ########## @@ -589,6 +590,35 @@ public Message receive() throws JMSException { return createActiveMQMessage(md); } + /** + * JMS 2.0 support method for receiveBody(bodyType) + * AMQ-8464 + */ + <T> T receiveBody(Class<T> bodyType) throws JMSException { + checkClosed(); + checkMessageListener(); + + sendPullCommand(0); + MessageDispatch md = dequeue(-1); + if (md == null) { + return null; + } + + beforeMessageIsConsumed(md); Review Comment: This line is also seems like a problem as the spec says that the method has to act like the receive never happened in certain modes (auto akck and dups ok) and calling this has side effects such as adding to deliveredMessages and updating next delivery id Issue Time Tracking ------------------- Worklog Id: (was: 883111) Time Spent: 1h 40m (was: 1.5h) > Implement JMS 2.0 Consumer receiveBody > -------------------------------------- > > Key: AMQ-8464 > URL: https://issues.apache.org/jira/browse/AMQ-8464 > Project: ActiveMQ > Issue Type: Task > Reporter: Matt Pavlovich > Assignee: Matt Pavlovich > Priority: Major > Labels: #jms2 > Fix For: 6.0.0, 5.18.3 > > Time Spent: 1h 40m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.20.10#820010)