HQ154004: Failed to deliver message: java.lang.IndexOutOfBoundsException: Readable byte limit exceeded: 17

Solution Verified - Updated -

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Issue

  • While sending messages from an application from EAP 5 to EAP 6 does not cause any errors, however while consuming the messages from a cosnumer at EAP 6 sends ends up in following exception:
ERROR [org.hornetq.ra] (Thread-217 (HornetQ-client-global-threads-486282777)) HQ154004: Failed to deliver message: java.lang.IndexOutOfBoundsException: Readable byte limit exceeded: 17
        at org.jboss.netty.buffer.AbstractChannelBuffer.readByte(AbstractChannelBuffer.java:236)
        at org.hornetq.core.buffers.impl.ChannelBufferWrapper.readByte(ChannelBufferWrapper.java:324)
        at org.hornetq.utils.TypedProperties.decode(TypedProperties.java:455)
        at org.hornetq.jms.client.HornetQMapMessage.doBeforeReceive(HornetQMapMessage.java:402)
        at org.hornetq.ra.inflow.HornetQMessageHandler.onMessage(HornetQMessageHandler.java:319)
        at org.hornetq.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:1117)
        at org.hornetq.core.client.impl.ClientConsumerImpl.access$500(ClientConsumerImpl.java:57)
        at org.hornetq.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:1252)
        at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:107)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) [rt.jar:1.6.0_30]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.6.0_30]
        at java.lang.Thread.run(Thread.java:701) [rt.jar:1.6.0_30]

Resolution

  • While sending messages from EAP 5, some of the messages were without any content. This lead consumer to throw the above exceptions while consuming these empty messages. Adding contents to the header of the messages resolves the issue.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.