Skip to content

Back pressure question #176

@hughpearse

Description

@hughpearse

Given this code

Flux<Map<String, Object>> resultFlux = databaseClient
.sql("SELECT TOP 101 * FROM ExampleTable") // Still fetch 101 from DB
.fetch()
.all()
.take(100); // Reactor stops after 100 items

resultFlux.subscribe(
row -> System.out.println("Row: " + row),
error -> System.err.println("Error: " + error),
() -> System.out.println("Query complete.")
);

Does this driver use back pressure to ensure the query is cancelled on the DBMS once the first 100 rows are received?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions