You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Timothy A. Bish (Jira)" <ji...@apache.org> on 2025/05/22 19:58:00 UTC

[jira] [Closed] (ARTEMIS-3122) Forwarding Compressed messages to an embedded Broker throw errors

     [ https://issues.apache.org/jira/browse/ARTEMIS-3122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy A. Bish closed ARTEMIS-3122.
------------------------------------
    Resolution: Cannot Reproduce

Created a project based on the sample and ran it against a 2.41.0 broker and messages passed normally.  Re-open with updated reproducer (preferably unit test) if the issue persists for you.

> Forwarding Compressed messages to an embedded Broker throw errors
> -----------------------------------------------------------------
>
>                 Key: ARTEMIS-3122
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3122
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.16.0
>         Environment: Linux tarek02 4.4.0-78-generic #99-Ubuntu SMP Thu Apr 27 15:29:09 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
>            Reporter: Tarek Hammoud
>            Priority: Major
>         Attachments: TestSendReciveOnEmbedded.java, local-only.xml
>
>
> A process receives a compressed message from a global broker. The message is simply forwarded to an embedded broker which in-turn throws a compression exception. I set the random byte array size to be 150k which is greater than the default 100k min compression size. Dropping that number to a lower number (100k or below) does not exhibit the issue. Attached is a test program that fails every time. 
> {noformat}
> [2021-02-16 15:51:24,691 EST] INFO  TestSendReciveOnEmbedded [main] Got a connection 
> [2021-02-16 15:51:24,809 EST] INFO  TestSendReciveOnEmbedded [Thread-0 (ActiveMQ-client-global-threads)] Forward:ActiveMQMessage[ID:bb78fb83-7098-11eb-9dc4-8a8eef5d4c5d]:NON-PERSISTENT/ClientLargeMessageImpl[messageID=2328, durable=false, address=testerTopic,userID=bb78fb83-7098-11eb-9dc4-8a8eef5d4c5d,properties=TypedProperties[__AMQ_CID=bb76d8a0-7098-11eb-9dc4-8a8eef5d4c5d,_AMQ_LARGE_COMPRESSED=true,_AMQ_LARGE_SIZE=150100,_AMQ_ROUTING_TYPE=0]] 
> [2021-02-16 15:51:24,824 EST] INFO  message [Thread-1 (ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$6@47289387)] AMQ601501: User anonymous@invm:0 is consuming a message from ebf8ed65-316a-4bf9-b665-d87e9621c0b8 
> [2021-02-16 15:51:24,849 EST] ERROR client [Thread-1 (ActiveMQ-client-global-threads)] AMQ134003: Message Listener failed to prepare message for receipt, message=ClientLargeMessageImpl[messageID=20, durable=false, address=testerTopic,userID=bb82bf84-7098-11eb-9dc4-8a8eef5d4c5d,properties=TypedProperties[__AMQ_CID=bb146d40-7098-11eb-9dc4-8a8eef5d4c5d,_AMQ_LARGE_COMPRESSED=true,_AMQ_LARGE_SIZE=150100,_AMQ_ROUTING_TYPE=0]] 
> org.apache.activemq.artemis.api.core.ActiveMQLargeMessageException: AMQ219029: Error writing body of message
>   at org.apache.activemq.artemis.core.client.impl.LargeMessageControllerImpl.sendPacketToOutput(LargeMessageControllerImpl.java:1112)
>   at org.apache.activemq.artemis.core.client.impl.LargeMessageControllerImpl.setOutputStream(LargeMessageControllerImpl.java:257)
>   at org.apache.activemq.artemis.core.client.impl.CompressedLargeMessageControllerImpl.setOutputStream(CompressedLargeMessageControllerImpl.java:74)
>   at org.apache.activemq.artemis.core.client.impl.CompressedLargeMessageControllerImpl.saveBuffer(CompressedLargeMessageControllerImpl.java:79)
>   at org.apache.activemq.artemis.core.client.impl.ClientLargeMessageImpl.checkBuffer(ClientLargeMessageImpl.java:159)
>   at org.apache.activemq.artemis.core.client.impl.ClientLargeMessageImpl.checkCompletion(ClientLargeMessageImpl.java:84)
>   at org.apache.activemq.artemis.jms.client.ActiveMQMessage.doBeforeReceive(ActiveMQMessage.java:801)
>   at org.apache.activemq.artemis.jms.client.ActiveMQObjectMessage.doBeforeReceive(ActiveMQObjectMessage.java:100)
>   at org.apache.activemq.artemis.jms.client.JMSMessageListenerWrapper.onMessage(JMSMessageListenerWrapper.java:93)
>   at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:1030)
>   at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.access$400(ClientConsumerImpl.java:49)
>   at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:1153)
>   at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42)
>   at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31)
>   at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:65)
>   at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>   at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>   at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)
> Caused by: java.io.IOException: Error decompressing data
>   at org.apache.activemq.artemis.utils.InflaterWriter.write(InflaterWriter.java:62)
>   at java.base/java.io.OutputStream.write(OutputStream.java:157)
>   at java.base/java.io.OutputStream.write(OutputStream.java:122)
>   at org.apache.activemq.artemis.core.client.impl.LargeMessageControllerImpl.sendPacketToOutput(LargeMessageControllerImpl.java:1106)
>   ... 17 common frames omitted
> Caused by: java.util.zip.DataFormatException: incorrect header check
>   at java.base/java.util.zip.Inflater.inflateBytesBytes(Native Method)
>   at java.base/java.util.zip.Inflater.inflate(Inflater.java:378)
>   at java.base/java.util.zip.Inflater.inflate(Inflater.java:464)
>   at org.apache.activemq.artemis.utils.InflaterWriter.doWrite(InflaterWriter.java:90)}}
>   at org.apache.activemq.artemis.utils.InflaterWriter.write(InflaterWriter.java:60)
>   ... 20 common frames omitted
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@activemq.apache.org
For additional commands, e-mail: issues-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact