Rxjava3 4.2.0-SNAPSHOT
On this page

Rxjava3

1 Introduction

Adds support for RxJava 3 to a Micronaut application. The following integrations are included:

  • Converters for RxJava 3 types so that RxJava 3 types can be used in controllers and clients

  • Instrumentation for RxJava 3 types so that tracing works with RxJava 3 types

  • A version of the Http client that supports RxJava 3

1.1 Release History

For this project, you can find a list of releases (with release notes) here:

2 Quick Start

Add the following dependency to your Micronaut application:

implementation("io.micronaut.rxjava3:micronaut-rxjava3")

To use the HTTP client add the following dependency:

implementation("io.micronaut.rxjava3:micronaut-rxjava3-http-client")

To use the RxJava 3 variation of the Micronaut HTTP client inject the Rx3HttpClient interface (or one of the other variants). For example:

Injecting the RxJava 3 clients

The methods of these clients return RxJava 3 types (Flowable, Single, Maybe) instead of Reactive Streams Publisher instances:

Using the RxJava 3 client
String greeting = httpClient.retrieve("/hello").blockingFirst();

3 Repository

You can find the source code of this project in this repository: