[ https://issues.apache.org/jira/browse/ARTEMIS-955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15870261#comment-15870261 ]
Timothy Bish commented on ARTEMIS-955: -------------------------------------- [~harrison-tarr] No you aren't doing anything wrong, it's a bug on the broker side that's affecting you. > Artemis does not handle message with an integer as the body on topics > --------------------------------------------------------------------- > > Key: ARTEMIS-955 > URL: https://issues.apache.org/jira/browse/ARTEMIS-955 > Project: ActiveMQ Artemis > Issue Type: Bug > Components: AMQP > Affects Versions: 1.5.1, 1.5.x > Reporter: Harrison Tarr > Priority: Minor > > When sending a message that contains only an integer as the body to a topic > with multiple subscribers, the messages fail to be consumed. > I have written some code that can replicate the problem. It is based off of > the `activemq-artemis` topic example. It can be found at > https://github.com/apache/activemq-artemis/compare/master...harrison-tarr:artemis-integer-message. > To toggle "working" and "failing" behavior back and forth, there is a block > of code at lines 83/84 and 88/89. If the comments on those blocks are > switched, artemis will exhibit working behavior. > The exception seems to be: > ```server-out:13:47:32,611 WARN > [org.apache.activemq.artemis.protocol.amqp.proton.ProtonServerSenderContext] > readerIndex(25) + length(81) exceeds writerIndex(102): > UnpooledDuplicatedByteBuf(ridx: 25, widx: 102, cap: 512, unwrapped: > UnpooledUnsafeHeapByteBuf(ridx: 17, widx: 17, cap: 512)): > java.lang.IndexOutOfBoundsException: readerIndex(25) + length(81) exceeds > writerIndex(102): UnpooledDuplicatedByteBuf(ridx: 25, widx: 102, cap: 512, > unwrapped: UnpooledUnsafeHeapByteBuf(ridx: 17, widx: 17, cap: 512)) > server-out: at > io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1395) > [netty-all-4.1.5.Final.jar:4.1.5.Final] > server-out: at > io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1389) > [netty-all-4.1.5.Final.jar:4.1.5.Final] > server-out: at > io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:850) > [netty-all-4.1.5.Final.jar:4.1.5.Final] > server-out: at > io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:858) > [netty-all-4.1.5.Final.jar:4.1.5.Final] > server-out: at > io.netty.buffer.WrappedByteBuf.readBytes(WrappedByteBuf.java:649) > [netty-all-4.1.5.Final.jar:4.1.5.Final] > server-out: at > org.apache.activemq.artemis.core.buffers.impl.ChannelBufferWrapper.readBytes(ChannelBufferWrapper.java:331) > [artemis-commons-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] > server-out: at > org.apache.activemq.artemis.protocol.amqp.converter.jms.ServerJMSObjectMessage.decode(ServerJMSObjectMessage.java:68) > [artemis-amqp-protocol-1.6.0-SNAPSHOT.jar:] > server-out: at > org.apache.activemq.artemis.protocol.amqp.converter.ProtonMessageConverter.outbound(ProtonMessageConverter.java:89) > [artemis-amqp-protocol-1.6.0-SNAPSHOT.jar:] > server-out: at > org.apache.activemq.artemis.protocol.amqp.broker.AMQPSessionCallback.encodeMessage(AMQPSessionCallback.java:272) > [artemis-amqp-protocol-1.6.0-SNAPSHOT.jar:] > server-out: at > org.apache.activemq.artemis.protocol.amqp.proton.ProtonServerSenderContext.deliverMessage(ProtonServerSenderContext.java:477) > [artemis-amqp-protocol-1.6.0-SNAPSHOT.jar:] > server-out: at > org.apache.activemq.artemis.protocol.amqp.broker.AMQPSessionCallback.sendMessage(AMQPSessionCallback.java:449) > [artemis-amqp-protocol-1.6.0-SNAPSHOT.jar:] > server-out: at > org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl.deliverStandardMessage(ServerConsumerImpl.java:1019) > [artemis-server-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] > server-out: at > org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl.proceedDeliver(ServerConsumerImpl.java:415) > [artemis-server-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] > server-out: at > org.apache.activemq.artemis.core.server.impl.QueueImpl.proceedDeliver(QueueImpl.java:2551) > [artemis-server-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] > server-out: at > org.apache.activemq.artemis.core.server.impl.QueueImpl.deliver(QueueImpl.java:2052) > [artemis-server-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] > server-out: at > org.apache.activemq.artemis.core.server.impl.QueueImpl.access$1700(QueueImpl.java:101) > [artemis-server-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] > server-out: at > org.apache.activemq.artemis.core.server.impl.QueueImpl$DeliverRunner.run(QueueImpl.java:2783) > [artemis-server-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] > server-out: at > org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$ExecutorTask.run(OrderedExecutorFactory.java:101) > [artemis-commons-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] > server-out: at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > [rt.jar:1.8.0_102] > server-out: at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > [rt.jar:1.8.0_102] > server-out: at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_102] > ``` -- This message was sent by Atlassian JIRA (v6.3.15#6346)