MrEasy commented on a change in pull request #2839: [ARTEMIS-2490] Prevent
NumberFormatExc when reading large message
URL: https://github.com/apache/activemq-artemis/pull/2839#discussion_r325603848
##########
File path:
artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java
##########
@@ -369,12 +369,11 @@ protected SequentialFile createFileForLargeMessage(final
long messageID, final b
LargeMessagePersister.getInstance().decode(buff, largeMessage);
if (largeMessage.containsProperty(Message.HDR_ORIG_MESSAGE_ID)) {
- // for compatibility: couple with old behaviour, copying the old file
to avoid message loss
- long originalMessageID =
largeMessage.getLongProperty(Message.HDR_ORIG_MESSAGE_ID);
Review comment:
Problem is that you can set the Core-message-ID and feed it with a
non-number. This then fails when reading it on journal initialization.
The format "ID:<UUID>" is used as JMS-message-id (in contrast to
core-message-id), so this seems to end-up sometimes as core-message-id as well.
In any case, I would like to request the retrieval to be moved inside the
compatibility block, since it is just unneeded outside.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services