AxonFramework/extension-reactor

Streaming query - (Flux as Query handler return type)

Closed this issue · 7 comments

The Streaming query allows a client to stream large database result sets. The Streaming query relies on the reactive stream model, specifically the Flux type.

The streaming query is flexible enough to be used with any query return type. That means that any return type that is not Flux will automatically be converted to Flux, based on that Flux will return single or multiple items.

Natively, if we want fine-grained control of the producing stream we can use Flux as return type:

@QueryHandler fun handleQuery(query: GetAllUsersQuery): Flux<UserView> { return repository.findAll() }

When using Flux as a return type, we can control backpressure, stream cancellation and implement more complex features like pagination.

Update: This feature will be part of Axon Framework core, while reactive extension will add support for reactive interceptors

Hi, news this topic ?

smcvb commented

Sorry for the delay here @sateliermartin. @stefanvozd was working on this, but it's been put on hold for the time being due to more pressing issues on other projects.
As soon as work resumes, this ticket will be updated accordingly.

This feature is being planned, and we hope that we can release it in Axon Framework 4.6.

dvins commented

Any ideas on when you’re targeting 4.6 then to be available?

smcvb commented

Any ideas on when you’re targeting 4.6 then to be available?

Obviously thanks for looking forward to the upcoming release @dvins.
We are however not in the habit of providing any dates, or close ballpark figures when it comes to our releases.
As times are rather busy at AxonIQ, making promises like that will only cause more harm than benefit it might achieve.

So, I can't go further than "expect it this year."
I hope that clarifies things.

Update: This feature will be part of Axon Framework core, while reactive extension will add support for reactive interceptors

smcvb commented

Closing this issue, as Axon Framework as off this pull request has integrated support for Streaming Queries.
Note that the promise made by @schananas in the above comment is captured in issue #149.