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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]