Skip to content

Conversation

@jbonofre
Copy link
Member

No description provided.

try {
Object body = message.getBody(c);
return c.cast(body);
} catch (JMSException e) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would violate the JMS specification in that it does not return the message to the head of the prefetch queue to be read again on the next receive call for the AUTO and DUPS_OK ack modes. Same for the other methods below.

The result of this method throwing a MessageFormatRuntimeException depends on the session mode:

AUTO_ACKNOWLEDGE or DUPS_OK_ACKNOWLEDGE: The JMS provider will behave as if the unsuccessful call to receiveBody had not occurred. The message will be delivered again before any subsequent messages.

This is not considered to be redelivery and does not cause the JMSRedelivered message header field to be set or the JMSXDeliveryCount message property to be incremented.

Copy link
Member Author

@jbonofre jbonofre Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tabish121 yes, for sure. It's a first draft. Gonna work on this.

@jbonofre jbonofre marked this pull request as draft November 19, 2025 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants