Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streaming query - (Flux as Query handler return type) #3

Closed
schananas opened this issue Sep 21, 2020 · 7 comments
Closed

Streaming query - (Flux as Query handler return type) #3

schananas opened this issue Sep 21, 2020 · 7 comments

Comments

@schananas
Copy link
Contributor

schananas commented Sep 21, 2020

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

@sateliermartin
Copy link

Hi, news this topic ?

@smcvb
Copy link
Member

smcvb commented Jul 1, 2021

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.

@schananas
Copy link
Contributor Author

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

@dvins
Copy link

dvins commented Jul 15, 2021

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

@smcvb
Copy link
Member

smcvb commented Jul 16, 2021

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.

@schananas schananas changed the title Publisher as Query handler return type Streaming query - (Publisher as Query handler return type) Nov 8, 2021
@schananas schananas changed the title Streaming query - (Publisher as Query handler return type) Streaming query - (Flux as Query handler return type) Nov 8, 2021
@schananas
Copy link
Contributor Author

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

@smcvb
Copy link
Member

smcvb commented Sep 12, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants