I'm toying with a websocket server that sends messages to an aeron publication. These get consumed by a subscription and this normally works fine. Published messages are consumed by an Agent backed subscription. However, when 2 messages are sent concurrently to the publication, I can see one of the messages consumed twice while the other is not. Any ideas what could be causing this?
I've tried to enable the Aeron Agent but setting it up with the same 1.40 version as the dependencies the project has, it throws this error:
Exception in thread "[sender,receiver,driver-conductor]" java.lang.LinkageError: loader constraint violation: when resolving method 'void io.aeron.agent.DriverEventLogger.log(io.aeron.agent.DriverEventCode, org.agrona.DirectBuffer, int, int)' the class loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @3e6f3bae of the current class, io/aeron/driver/ClientCommandAdapter, and the class loader 'app' for the method's defining class, io/aeron/agent/DriverEventLogger, have different Class objects for the type org/agrona/DirectBuffer used in the signature (io.aeron.driver.ClientCommandAdapter is in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @3e6f3bae, parent loader 'app'; io.aeron.agent.DriverEventLogger is in unnamed module of loader 'app')
at io.aeron.driver.ClientCommandAdapter.onMessage(ClientCommandAdapter.java:75)
at org.agrona.concurrent.ringbuffer.ManyToOneRingBuffer.read(ManyToOneRingBuffer.java:201)
at io.aeron.driver.ClientCommandAdapter.receive(ClientCommandAdapter.java:66)
at io.aeron.driver.DriverConductor.doWork(DriverConductor.java:216)
at org.agrona.concurrent.CompositeAgent.doWork(CompositeAgent.java:120)
at org.agrona.concurrent.AgentRunner.doWork(AgentRunner.java:304)
at org.agrona.concurrent.AgentRunner.workLoop(AgentRunner.java:296)
at org.agrona.concurrent.AgentRunner.run(AgentRunner.java:162)
at java.base/java.lang.Thread.run(Thread.java:1589)
I've also tried to hook to a running process using the instructions here but it fails saying dynamic agent cannot be found:
$ java -cp ./aeron-all-1.40.0.jar io.aeron.agent.DynamicLoggingAgent ./aeron-agent-1.40.0.jar 61616 start
Error: Could not find or load main class io.aeron.agent.DynamicLoggingAgent
Thanks