java.lang.IllegalStateException: not enough space to write 1073741823 was 1073741766 at net.openhft.chronicle.wire.AbstractWire.throwNotEnoughSpace(AbstractWire.java:67) at net.openhft.chronicle.wire.AbstractWire.writeHeader(AbstractWire.java:210) at net.openhft.chronicle.queue.impl.single.StoreRecovery.writeHeader(StoreRecovery.java:24) at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueStore.writeHeader(SingleChronicleQueueStore.java:305) at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueExcerpts$StoreAppender.writingDocument(SingleChronicleQueueExcerpts.java:167) at net.openhft.chronicle.wire.MethodWriterInvocationHandler.invoke(MethodWriterInvocationHandler.java:51) at com.sun.proxy.$Proxy27.onPut(Unknown Source)
<dependency> <groupId>net.openhft</groupId> <artifactId>chronicle-queue</artifactId> <version>4.4.2</version></dependency>
queue = SingleChronicleQueueBuilder.binary("/data/" + (diskNumber.getAndIncrement() % 6 + 1) + "/some/event/dir").build();
--
You received this message because you are subscribed to the Google Groups "Chronicle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-chronicl...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
if (maxlen > bytes.writeRemaining())
return throwNotEnoughSpace(maxlen, bytes);
<artifactId>chronicle-wire</artifactId>
<version>1.7.14-SNAPSHOT</version>
<dependency> <groupId>net.openhft</groupId> <artifactId>chronicle-queue</artifactId>
<version>4.5.14</version></dependency>
java.lang.AssertionError: you cant put a header inside a header, check that you have not nested the documents. at net.openhft.chronicle.wire.AbstractWire.writeHeader(AbstractWire.java:259) at net.openhft.chronicle.queue.impl.single.StoreRecovery.writeHeader(StoreRecovery.java:45) at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueStore.writeHeader(SingleChronicleQueueStore.java:332) at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueExcerpts$StoreAppender.writingDocument(SingleChronicleQueueExcerpts.java:303) at net.openhft.chronicle.wire.MethodWriterInvocationHandler.invoke(MethodWriterInvocationHandler.java:51) at com.sun.proxy.$Proxy26.onPut(Unknown Source)
java.lang.AssertionError: you cant put a header inside a header, check that you have not nested the documents. at net.openhft.chronicle.wire.AbstractWire.writeHeader(AbstractWire.java:259) at net.openhft.chronicle.queue.impl.single.StoreRecovery.writeHeader(StoreRecovery.java:45) at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueStore.writeHeader(SingleChronicleQueueStore.java:332) at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueExcerpts$StoreAppender.writingDocument(SingleChronicleQueueExcerpts.java:303) at net.openhft.chronicle.wire.MethodWriterInvocationHandler.invoke(MethodWriterInvocationHandler.java:51) at com.sun.proxy.$Proxy26.onPut(Unknown Source)
MethodWriterInvocationHandler(MarshallableOut appender);
are you using the same appender across threads ? do you have an appender per thread !
position(store.writeHeader(wire, length, timeoutMS())); // start the header
wireBytes.write(bytes);
wire.updateHeader(length, position, false); // end the header
mutationEventHandler = queue.createAppender().methodWriter(MutationEventHandler.class);
public class GatewayQueue implements GatewayEventHandler {
@NotNull
private final ChronicleQueue queue;
private ThreadLocal<GatewayEventHandler> gatewayEvents = ThreadLocal.withInitial(this::newGatewayEventHandler);
public GatewayQueue(@NotNull final String path,
@NotNull final EventGroup eg,
@NotNull final Object... objects) {
queue = ((ChronicleQueueBuilder) ChronicleQueueBuilder.single(path)).build();
final MethodReader methodReader = queue.createTailer().toEnd().methodReader(objects);
eg.addHandler(methodReader::readOne);
}
private GatewayEventHandler newGatewayEventHandler() {
ExcerptAppender appender = queue.acquireAppender();
final MethodWriterBuilder<GatewayEventHandler> builder =
appender.methodWriterBuilder(GatewayEventHandler.class);
builder.recordHistory(true);
return builder.get();
}
@Override
public MessageGenerator onNewOrderSingle(NewOrderSingle newOrderSingle) {
gatewayEvents.get().onNewOrderSingle(newOrderSingle);
return null;
}
@Override
public MessageGenerator onOrderCancelReject(OrderCancelReject orderCancelReject) {
gatewayEvents.get().onOrderCancelReject(orderCancelReject);
return null;
}
@Override
public MessageGenerator onOrderCancelRequest(OrderCancelRequest orderCancelRequest) {
gatewayEvents.get().onOrderCancelRequest(orderCancelRequest);
return null;
}
}
at what point does multiple appender contention become a significant bottle-neck?