Maurice van Veen

Results 122 comments of Maurice van Veen

@scottf, I have been looking into the code and I believe I've found what goes wrong in `NatsConnectionWriter.sendMessageBatch` (related to the `ArrayIndexOutOfBoundsException`): - The exception gets thrown when the `sendBuffer`...

Created a PR for this in advance :slightly_smiling_face:

Yeah, I believe changing this into the `continue` would solve this, by ensuring the re-size is checked again and that one message isn't lost.

Small update from my end. Have not been able to reproduce this error reliably (if at all) on our setup.. Seems like it takes a really long time to get...

Another update, we've updated to version 2.16.1 yesterday and are still encountering this issue sadly. ``` 11-Oct-2022 18:07:46.413 ERROR [pool-2-thread-1] io.nats.client.impl.ErrorListenerLoggerImpl: exceptionOccurred, Connection: 119, Exception: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: arraycopy: last destination...

@scottf Got a full stacktrace this time: ``` java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: arraycopy: last destination index 65643 out of bounds for byte[65536] at java.base/java.util.concurrent.FutureTask.report(Unknown Source) at java.base/java.util.concurrent.FutureTask.get(Unknown Source) at io.nats.client.impl.NatsConnection.tryToConnect(NatsConnection.java:381) at io.nats.client.impl.NatsConnection.reconnect(NatsConnection.java:254)...

Not sure how to reproduce it yet. Currently trying to dig through the logs to get more clarity. Looking a bit more in the logs for a timeline: - UTC...

Our way of "reproducing" this so far was running it for a day or two until it eventually goes into this state, but that isn't really a reliable way :sweat:

I like the proposal, having clients indicate themselves if they have prio1 to receive the data, and if they are willing to have lower prio2 clients take up the work...

Added a test to reproduce the issue. An easy, but hacky, way to solve it is to fully ignore `StatusMessage` for the `length` and `sizeInBytes` calculations in `MessageQueue`.. However, `NatsJetStreamSubscription`...