Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1574#discussion_r142941151
  
    --- Diff: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
 ---
    @@ -1309,12 +1309,30 @@ public RoutingStatus send(final Message message,
           return send(getCurrentTransaction(), message, direct, 
noAutoCreateQueue);
        }
     
    +
    +   private LargeServerMessage messageToLargeMessage(Message message) 
throws Exception {
    +      LargeServerMessage lsm = 
getStorageManager().createLargeMessage(storageManager.generateID(), message);
    --- End diff --
    
    You need to change this to:
    
    ```java
          ICoreMessage coreMessage = message.toCore();
          LargeServerMessage lsm = 
getStorageManager().createLargeMessage(storageManager.generateID(), 
coreMessage);
          coreMessage.getReadOnlyBodyBuffer()
    ```
    
    Also:
    
    - You are losing properties here.. you need to copy the messages from 
message into largeMessage.
    - The createLargeMessage was intended for serverSend operations.. it will 
add a pending record on the journal.. you need to make sure the complete is 
called somehow.. Most likely if you restart the system with this message 
pending, it will be deleted since there will be a pending large message record 
on the journal/database.
    
    
    I take this as incomplete.



---

Reply via email to