[ 
https://issues.apache.org/jira/browse/AMQ-8464?focusedWorklogId=992508&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-992508
 ]

ASF GitHub Bot logged work on AMQ-8464:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Nov/25 21:04
            Start Date: 19/Nov/25 21:04
    Worklog Time Spent: 10m 
      Work Description: jbonofre commented on code in PR #1543:
URL: https://github.com/apache/activemq/pull/1543#discussion_r2543563507


##########
activemq-client/src/main/java/org/apache/activemq/ActiveMQConsumer.java:
##########
@@ -100,17 +100,44 @@ public void close() {
 
     @Override
     public <T> T receiveBody(Class<T> c) {
-        throw new UnsupportedOperationException("receiveBody(Class<T>) is not 
supported");
+        Message message = receive();
+        if (message == null) {
+            return null;
+        }
+        try {
+            Object body = message.getBody(c);
+            return c.cast(body);
+        } catch (JMSException e) {

Review Comment:
   @tabish121 yes, for sure. It's a first draft.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 992508)
    Time Spent: 2h 40m  (was: 2.5h)

> Implement JMS 2.0 Consumer receiveBody
> --------------------------------------
>
>                 Key: AMQ-8464
>                 URL: https://issues.apache.org/jira/browse/AMQ-8464
>             Project: ActiveMQ Classic
>          Issue Type: New Feature
>            Reporter: Matt Pavlovich
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>              Labels: #jms2
>             Fix For: 6.3.0
>
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to