Micronaut RxJava 3

Integration between Micronaut and RxJava 3

Version: 3.5.0

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")
<dependency>
    <groupId>io.micronaut.rxjava3</groupId>
    <artifactId>micronaut-rxjava3</artifactId>
</dependency>

To use the HTTP client add the following dependency:

implementation("io.micronaut.rxjava3:micronaut-rxjava3-http-client")
<dependency>
    <groupId>io.micronaut.rxjava3</groupId>
    <artifactId>micronaut-rxjava3-http-client</artifactId>
</dependency>

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

import io.micronaut.rxjava3.http.client.*;

@Inject Rx3HttpClient httpClient; // regular client
@Inject Rx3SseClient sseClient; // server sent events
@Inject Rx3StreamingHttpClient streamingClient; // streaming

3 Repository

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