Details
-
Bug
-
Resolution: Done
-
Major
-
AMQ 7.8.0.GA
Description
Using Openwire protocol, when some messages have been produced setting some specific properties, later on trying to consume those messages also using Openwire, the following exception is shown in the server log:
WARN [org.apache.activemq.artemis.core.server] Error during message dispatch: java.lang.ClassCastException: org.apache.activemq.artemis.api.core.SimpleString cannot be cast to java.lang.String
The exception log level is WARNING, but the effect is that all messages having that problem are stuck in the server, and cannot be consumed using Openwire. Using the Core protocol you can consume them without any problem.
If the messages are published with one of the following properties set, the error will arise:
- __HDR_BROKER_PATH
- __HDR_CLUSTER
- __HDR_USER_ID
Example code:
message.setStringProperty("__HDR_BROKER_PATH", "test-broker-path");
The properties have been extracted after analyzing the class org.apache.activemq.artemis.core.protocol.openwire.OpenWireMessageConverter.
The whole exception stacktrace is attached.exception-stacktrace.log
Attachments
Issue Links
- is cloned by
-
ENTMQBR-4963 [LTS] [Openwire-protocol] ClassCastException consuming messages
- Closed