Hi,
we have a setup of an Axon Server cluster (2025.2.7) with some applications built upon Axon Framework (4.13.3). For some use cases we’re using Streaming Queries to transport a lot of data between two applications. These queries may have thousands of data records, and a query may take several minutes. Data flow is constantly high with thousands of records per second.
For long-running streaming queries we detected cancellations. Neither the query sender nor the query handler do cancel the query. It seems the Axon Server cancels it as there are two log entries:
- WARN io.axoniq.axonserver.message.EnterpriseQueryCache Found 1 waiting queries to delete
- WARN io.axoniq.axonserver.message.EnterpriseQueryCache Cancelling query xxx.yyy.zzz.StreamingQuery sent by 1@aaa…, waiting for reply from [1@bbb…]
To keep it simple in this example, assume the following setup: Three Axon Server nodes (1, 2, 3) and two applications (aaa, bbb). Queries are cancelled if both applications are connected two different Axon Servers (e.g. 1-aaa and 2-bbb). If they are connected to the same server, the query won’t get cancelled (e.g. 1-aaa and 1-bbb). Above log statements are logged by the Axon Server which is connected to the application with the query handler. The other Axon server (connected to the app with the query sender) logs nothing.
Cancellation happens after about 5 minutes. Some further investigations showed that the Axon Server property axoniq.axonserver.default-query-timeout controls this timeout (with a default of 5 minutes - there it is).
My questions:
- Are Streaming Queries supported in an Axon Server cluster?
- What is the idea behind
axoniq.axonserver.default-query-timeout? The documentation is brief. It seems it is something like a safe-guard to cancel queries running out-of-control? - What impact has increasing this timeout? What resource requirement has a streaming query on Axon Server?
To meet our business requirements, we’re going to increase the timeout from 5 minutes to 1 hour. The use case is rarely used, we’ll keep monitoring our system.
Best regards,
Matthias