Here are the examples of the java api class org.apache.activemq.artemis.core.persistence.impl.journal.codec.LargeMessageEncoding taken from open source projects.
1. JournalStorageManager#parseLargeMessage()
Project: activemq-artemis
File: JournalStorageManager.java
File: JournalStorageManager.java
@Override protected /** * @param messages * @param buff * @return * @throws Exception */ LargeServerMessage parseLargeMessage(final Map<Long, ServerMessage> messages, final ActiveMQBuffer buff) throws Exception { LargeServerMessage largeMessage = createLargeMessage(); LargeMessageEncoding messageEncoding = new LargeMessageEncoding(largeMessage); messageEncoding.decode(buff); 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); SequentialFile currentFile = createFileForLargeMessage(largeMessage.getMessageID(), true); if (!currentFile.exists()) { SequentialFile linkedFile = createFileForLargeMessage(originalMessageID, true); if (linkedFile.exists()) { linkedFile.copyTo(currentFile); linkedFile.close(); } } currentFile.close(); } return largeMessage; }