[
https://issues.apache.org/jira/browse/AMQ-7309?focusedWorklogId=630531&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-630531
]
ASF GitHub Bot logged work on AMQ-7309:
---------------------------------------
Author: ASF GitHub Bot
Created on: 28/Jul/21 13:59
Start Date: 28/Jul/21 13:59
Worklog Time Spent: 10m
Work Description: mattrpav commented on pull request #682:
URL: https://github.com/apache/activemq/pull/682#issuecomment-888331948
> > @gemmellr - Can you describe this scenario in more detail or a specific
use case? I want to make sure we are not breaking anything with throwing
unimplemented exceptions and how big of an edge case it is.
>
> Take an ActiveMQ 5 JMS message object, and send that JMS Message somewhere
else using a different JMS client. E.g receive from a 5.x broker and publish
using the same message object to another type of broker...could be due to
communicating with different teams, companies, or handling a system transition,
etc.
>
> As part of that process if the other provider is actually a JMS 2 client,
it will try to stamp the JMSDeliveryTime on the original message object like
its meant to. It may have handled the method not being implemented at all on
JMS 1.x message objects since thats not so unexpected due to spec transition,
but will likely fail if the method actually exists but simply throws UOE as
thats unexpected.
@gemmellr yeah, so tricky corner of the JMS API. This trips up a lot of
folks that are new to JMS-- the setDeliveryDelay can only be honored when set
on the MessageProducer object. Any code that calls it on the Message is not
valid per the spec.
```
7.9 Message Delivery Delay
An application may specify the required delivery delay using the method
setDeliveryDelay on the producer object. This sets the delivery delay of
all messages sent using that producer. Note however that the
setDeliveryDelay method on Message cannot be used to set the
delivery delay of a message.
```
For the JMS bridge idea, I can't walk a scenario where would be _actually_
problematic. This feels hypothetical as it has a chicken-and-egg problem. The
JMS API doesn't define how message data is hydrated into the Message object. It
is handled by the provider impl and the wire protocol-- there is not support
for the DeliveryDelay field in OpenWire at this time and there is nothing in
ActiveMQ code base that calls setDeliveryDelay, and then throw an exception
unexpectedly on a user.
As far as anyone providing a JMS 2.0 wrapper for ActiveMQ-- any code that is
currently calling ActiveMQ using a JMS 2.0 MessageProducer to set a
DeliveryDelay must have a custom wrapper impl for MessageProducer. Those
scenarios are out-of-reach edge cases.
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 630531)
Time Spent: 4h 40m (was: 4.5h)
> Add JMS 2.0 support
> -------------------
>
> Key: AMQ-7309
> URL: https://issues.apache.org/jira/browse/AMQ-7309
> Project: ActiveMQ
> Issue Type: New Feature
> Components: Broker, JMS client
> Reporter: Jean-Baptiste Onofré
> Assignee: Jean-Baptiste Onofré
> Priority: Major
> Fix For: 5.17.0
>
> Time Spent: 4h 40m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)