Description
When streaming a "large message" with size 0, the exception below is generated in the server.
The issue can be easily reproduced by changing the SIZE to 0 in LargeMessageTest#testSendStreamingSingleMessage
I'm still using HornetQ 2.4.6 but I tested quickly that the error is present in Artemis.
One side effect in HornetQ (maybe same for Artemis) is that I have several pending large messages of size 0 stored in a durable queue and because of them not even the other messages of size greater than 0 are delivered.
13:38:48,883 ERROR [org.apache.activemq.artemis.core.server] AMQ224045: Failed to run large message deliverer: java.lang.UnsupportedOperationException
at java.nio.ByteBuffer.array(ByteBuffer.java:994) [rt.jar:1.8.0_66]
at org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl$LargeMessageDeliverer.deliver(ServerConsumerImpl.java:1001) [:]
at org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl$2.run(ServerConsumerImpl.java:897) [:]
at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$ExecutorTask.run(OrderedExecutorFactory.java:100) [:]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_66]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_66]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_66]