我正在编写一个适配器来在Apache Aries远程服务管理中使用chronicle队列。当我只使用一个线程时,它工作正常。有多个线程我得到如下的异常。
知道我做错了吗?
如果增加执行程序中的线程数,则可以看到异常。
Exception in thread "pool-3-thread-2" java.nio.BufferOverflowException
at net.openhft.chronicle.bytes.AbstractBytes.writePosition(AbstractBytes.java:182)
at net.openhft.chronicle.bytes.AbstractBytes.writePosition(AbstractBytes.java:29)
at net.openhft.chronicle.wire.AbstractWire.writeHeader0(AbstractWire.java:183)
at net.openhft.chronicle.wire.AbstractWire.writeHeader(AbstractWire.java:171)
at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueExcerpts$StoreAppender.append(SingleChronicleQueueExcerpts.java:252)
at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueExcerpts$StoreAppender.writeBytes(SingleChronicleQueueExcerpts.java:153)
at org.apache.aries.rsa.provider.chronicle.ChronicleInvocationHandler.invoke(ChronicleInvocationHandler.java:45)
at com.sun.proxy.$Proxy7.callOneWay(Unknown Source)
at org.apache.aries.rsa.provider.chronicle.ChronicleProviderTest$1.run(ChronicleProviderTest.java:87)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)