Axon Server 4.5.1 - Query Cache cancelling queries

Hi there,

I’m using Axon Server 4.5.1 Community Edition with Axon Framwork 4.5.1 on Spring Boot 2.4.5 and I’m observing a strange behavior in the sense that some queries are automatically cancelled by Axon Server without any explicit request issued from the client application.

This triggers a AxonServerQueryDispatchException on the client side, because the results stream is closed while the query transaction is not complete (“Query did not yield the expected number of results”).

The process of auto-cancelling seems to be originated in the Query cache on Axon server. What would could be the reason for this ?

My assumption is that this is an optimization mechanism triggered whenever AxonServer detects similar queries coming from the same client in a short span of time, effectively dropping the oldest ones and hence preventing unnecessary waste of resources and processing time. Am I on the right way ?

If this is the case, I guess that the fix consists in properly handling that case on the client side, but as the query call is initiated by a Vaadin DataProvider, I have a limited control over that.

Thank you for your insights,

Hi Jerome,

what kind of load are you putting on the Query Bus? If you send more queries than can be handled downstream, Axon Server starts “pushing back”.