Micronaut RxJava 3

Integration between Micronaut and RxJava 3

Version:

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

1.0.0

  • First Release

2 Quick Start

Add the following dependency to your Micronaut application:

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

To use the RxJava 3 variation of the Micronaut HTTP client inject the Rx3HttpClient interface (or one 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