-
Bug
-
Resolution: Won't Do
-
Critical
-
None
-
A-MQ 7.0.0.GA
-
None
Hi All,
I have developed a message interceptor for an A-MQ 7 cluster based on the example that comes with the broker. However, the following error is thrown every time a new master connects to the cluster.
AMQ212038: Failure in calling interceptor: com.redhat.consulting.LoggingInterceptor@5062e7bd: java.lang.IndexOutOfBoundsException: readerIndex(4) + length(1) exceeds writerIndex(4): UnpooledDuplicatedByteBuf(ridx: 4, widx: 4, cap: 50, unwrapped: UnpooledUnsafeHeapByteBuf(ridx: 4, widx: 4, cap: 50))
at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1395) [netty-all-4.1.5.Final-redhat-1.jar:4.1.5.Final-redhat-1]
at io.netty.buffer.AbstractByteBuf.readByte(AbstractByteBuf.java:687) [netty-all-4.1.5.Final-redhat-1.jar:4.1.5.Final-redhat-1]
at io.netty.buffer.WrappedByteBuf.readByte(WrappedByteBuf.java:521) [netty-all-4.1.5.Final-redhat-1.jar:4.1.5.Final-redhat-1]
at io.netty.buffer.WrappedByteBuf.readByte(WrappedByteBuf.java:521) [netty-all-4.1.5.Final-redhat-1.jar:4.1.5.Final-redhat-1]
at org.apache.activemq.artemis.api.core.SimpleString.readNullableSimpleString(SimpleString.java:139) [artemis-commons-2.0.0.amq-700005-redhat-1.jar:2.0.0.amq-700005-redhat-1]
at org.apache.activemq.artemis.core.buffers.impl.ChannelBufferWrapper.readNullableSimpleString(ChannelBufferWrapper.java:69) [artemis-commons-2.0.0.amq-700005-redhat-1.jar:2.0.0.amq-700005-redhat-1]
at org.apache.activemq.artemis.reader.TextMessageUtil.readBodyText(TextMessageUtil.java:37) [artemis-core-client-2.0.0.amq-700005-redhat-1.jar:2.0.0.amq-700005-redhat-1]
at com.redhat.consulting.LoggingInterceptor.intercept(LoggingInterceptor.java:36) [logging-interceptor-1.0.jar:]
at com.redhat.consulting.LoggingInterceptor.intercept(LoggingInterceptor.java:16) [logging-interceptor-1.0.jar:]
at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.invokeInterceptors(ChannelImpl.java:432) [artemis-core-client-2.0.0.amq-700005-redhat-1.jar:2.0.0.amq-700005-redhat-1]
at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.send(ChannelImpl.java:266) [artemis-core-client-2.0.0.amq-700005-redhat-1.jar:2.0.0.amq-700005-redhat-1]
at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBatched(ChannelImpl.java:239) [artemis-core-client-2.0.0.amq-700005-redhat-1.jar:2.0.0.amq-700005-redhat-1]
at org.apache.activemq.artemis.core.protocol.core.impl.CoreSessionCallback.sendMessage(CoreSessionCallback.java:101) [artemis-server-2.0.0.amq-700005-redhat-1.jar:2.0.0.amq-700005-redhat-1]
at org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl.deliverStandardMessage(ServerConsumerImpl.java:1050) [artemis-server-2.0.0.amq-700005-redhat-1.jar:2.0.0.amq-700005-redhat-1]
at org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl.proceedDeliver(ServerConsumerImpl.java:430) [artemis-server-2.0.0.amq-700005-redhat-1.jar:2.0.0.amq-700005-redhat-1]
at org.apache.activemq.artemis.core.server.impl.QueueImpl.proceedDeliver(QueueImpl.java:2649) [artemis-server-2.0.0.amq-700005-redhat-1.jar:2.0.0.amq-700005-redhat-1]
at org.apache.activemq.artemis.core.server.impl.QueueImpl.deliver(QueueImpl.java:2138) [artemis-server-2.0.0.amq-700005-redhat-1.jar:2.0.0.amq-700005-redhat-1]
at org.apache.activemq.artemis.core.server.impl.QueueImpl.access$1700(QueueImpl.java:102) [artemis-server-2.0.0.amq-700005-redhat-1.jar:2.0.0.amq-700005-redhat-1]
at org.apache.activemq.artemis.core.server.impl.QueueImpl$DeliverRunner.run(QueueImpl.java:2882) [artemis-server-2.0.0.amq-700005-redhat-1.jar:2.0.0.amq-700005-redhat-1]
at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$ExecutorTask.run(OrderedExecutorFactory.java:101) [artemis-commons-2.0.0.amq-700005-redhat-1.jar:2.0.0.amq-700005-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_131]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_131]
source code for the interceptor: https://github.com/redhat-work/artemis-log-interceptor