Skip to content

usingWhen factory issue with reactor-core 3.4.17 #23

@srikanthpolineni

Description

@srikanthpolineni

UsingWhen factory method declaration got changed in reactor-core 3.4.17. Source needs to update with

@Test
    public void usingWhenExample() throws InterruptedException {
        Flux.usingWhen(
                Transaction.beginTransaction(),
                transaction -> transaction.insertRows(Flux.just("A", "B")),
                Transaction::commit,
                (transaction, throwable) -> Mono.empty(), // <<== extra parameter
                Transaction::rollback
        ).subscribe(
                d -> log.info("onNext: {}", d),
                e -> log.info("onError: {}", e.getMessage()),
                () -> log.info("onComplete")
        );

        Thread.sleep(1000);
    }

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