Package io.axoniq.framework.springcloud.query


@NullMarked package io.axoniq.framework.springcloud.query
The query side of the Spring Cloud connector: the connector distributing queries and subscription queries, and the HTTP transport carrying them between members of the cluster.

SpringCloudQueryBusConnector rotates each query over the members advertising its name, and either invokes this application's own handler when the chosen member is the local one, or hands the query to the transport. A query may be answered any number of times, so it is one request answered by a stream of Server-Sent Events: QueryDispatchRequest carries it out, QueryDispatchResponse and QueryDispatchFailure carry the answer back, and ServerSentEventReader reads them without a reactive stack. RemoteQueryDispatcher sends a query, SpringCloudQueryController receives it, and IncomingQueryInvoker invokes the local handler with it, writing every response to a QueryResponseSink, which SseQueryResponseSink adapts to the response stream.

A subscription query reaches every member advertising its name: each one receives a SubscriptionQueryRequest, registers the subscription, and streams the updates it emits back over the same kind of response stream. The initial result is asked for as a regular query.