Hello, We are using transformers (https://activemq.apache.org/components/artemis/documentation/latest/transformers.html) to add properties to messages. Two or three times a week the incoming message has an encoded size some bytes beyond the 490K limit for being persisted in journal. By adding the properties, the returned message encoded size exceeds the 490K limit. The attempt of the broker to persist that message in journal causes an ActiveMQIOErrorException having the AMQ149005 warning.
I'm aware information about the encoded message size and if message is already a LargeMessage can be obtained in transformer class from incoming message object. So, I can check if returning that message will cause the ActiveMQIOErrorException. But I'm not sure how to handle that erroneous situation then. I would prefer to change such a message to a LargeServerMessageImpl to move message body out of journal to an extra file. But incoming message class doesn't support such operations, so transformer class probably isn't the right place for such an operation anyway. Simply returning the unchanged message is not an option, because consumers of that messages expect those properties. I had two workarounds in mind. Option 1: Our applications use OpenWire clients to send and receive messages. Converting these messages to core messages results in some message properties with prefix "__HDR_" in names. Removing these properties would give enough place for our custom properties, but I'm not sure about the consequences of removing those properties. We don't use those properties, but for Artemis and Active MQ OpenWire receiver clients I don't know. Option 2: Use interceptors for adding a place holder property for incoming messages having a size near 490K limit. This forces the broker to create a LargeMessage itself before message enters the transformer. Transformer replaces place holder property by our custom properties, result message size is smaller than incoming message. We are going currently for the place holder property. All comments on this are appreciated. On long term I would like to have Artemis checking the result from transformers for being candidate for LargeMessage. Seems class LargeServerMessageImpl. checkLargeMessage is used for that case in Artemis, at least I have found the associated debug output during tests. Kind regards, Arno Arno Schürhoff (he/him/his) Solution Architect ESB, Enterprise Data Services HAVI Logistics Business Services GmbH Geitlingstr. 20, 47228 Duisburg, Germany Phone +49 2065 7084991 Mobile +49 173 2576088 arno.schuerh...@havi.com<mailto:arno.schuerh...@havi.com> HAVI.com<http://www.havi.com/> [cid:image001.png@01DAE8AF.B037F8F0] Geschäftsführer: Arnd Christochowitz Die Gesellschaft ist eingetragen beim Registergericht Duisburg (Sitz der Gesellschaft) Nr. HRB 8829. Please consider the environment before printing this email. ______________________________________________________________________ This e-mail and any accompanying documents or files contain information that is the property of HAVI, that is intended solely for those to whom this e-mail is addressed (i.e., those identified in the "To" and "Cc" boxes), and that is confidential, proprietary, and/or privileged. If you are not an intended recipient of this e-mail, you are hereby notified that any viewing, use, disclosure, forwarding, copying, or distribution of any of this information is strictly prohibited and may be subject to legal sanctions. If you have received this e-mail in error, please notify the sender immediately of any unintended recipients, and delete the e-mail, all attachments, and all copies of both from your system. While we have taken reasonable precautions to ensure that any attachments to this e-mail have been swept for viruses, we cannot accept liability for any damage sustained as a result of software viruses. ______________________________________________________________________