[
https://issues.apache.org/jira/browse/ARTEMIS-2551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16975546#comment-16975546
]
Justin Bertram commented on ARTEMIS-2551:
-----------------------------------------
As [~robbie] noted, it appears that something (e.g. the foreign message
implementation itself, your application, etc.) is explicitly setting
{{JMSXGroupSeq}} to {{null}} otherwise {{JMSXGroupSeq}} wouldn't be returned by
{{javax.jms.Message.getPropertyNames()}}. Therefore it looks to me like the
Artemis JMS bridge bridge isn't forcing you to set a value for functionality
that you do not use. That's already being done before the message reaches the
bridge. The bridge is just rejecting a message with a property whose value
violates the JMS specification.
The only compromise I see here is to log a {{WARN}} message when a {{null}}
value for {{JMSXGroupSeq}} is encountered and then ignore the property.
However, I see two potential issues with that approach:
# The logging from the bridge may be heavy. In the worst case it would log a
{{WARN}} for every message it processes. This could result in disk space
exhaustion (if log files were allowed to grow indefinitely) or additional log
management requirements (to mitigate the risk of disk space exhaustion).
# Some user out there may be relying on the fact that a {{null}} value for
{{JMSXGroupSeq}} throws an exception. That's admittedly a remote possibility,
but I've seen a lot of bizarre logic in user applications over the years.
Assuming you can't identify (or change) whatever is setting {{JMSXGroupSeq}} to
{{null}} do you see another possible compromise?
> NPE in MessageUtil.setObjectProperty when name is 'JMSXGroupSeq'
> ----------------------------------------------------------------
>
> Key: ARTEMIS-2551
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2551
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Affects Versions: 2.10.1
> Reporter: Michael Szodorai
> Priority: Critical
>
> {code:java}
> java.lang.NullPointerException
> at java.base/java.util.Objects.requireNonNull(Objects.java:221)
> at
> [email protected]//org.apache.activemq.artemis.reader.MessageUtil.getInteger(MessageUtil.java:267)
> at
> [email protected]//org.apache.activemq.artemis.reader.MessageUtil.setObjectProperty(MessageUtil.java:258)
> at
> [email protected]//org.apache.activemq.artemis.jms.client.ActiveMQMessage.setObjectProperty(ActiveMQMessage.java:702)
> at
> [email protected]//org.apache.activemq.artemis.jms.client.ActiveMQMessage.<init>(ActiveMQMessage.java:296)
> at
> [email protected]//org.apache.activemq.artemis.jms.client.ActiveMQBytesMessage.<init>(ActiveMQBytesMessage.java:88)
> at
> [email protected]//org.apache.activemq.artemis.jms.client.ActiveMQMessageProducer.doSendx(ActiveMQMessageProducer.java:421)
> at
> [email protected]//org.apache.activemq.artemis.jms.client.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:222)
> at
> [email protected]//org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl.sendMessages(JMSBridgeImpl.java:1627)
> at
> [email protected]//org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl.sendBatchNonTransacted(JMSBridgeImpl.java:1460)
> at
> [email protected]//org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl.sendBatch(JMSBridgeImpl.java:1435)
> at
> [email protected]//org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl.access$1800(JMSBridgeImpl.java:77)
> at
> [email protected]//org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl$SourceReceiver.run(JMSBridgeImpl.java:1829)
> at
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> at java.base/java.lang.Thread.run(Thread.java:834)
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)