Skip to content

Latest commit

 

History

History
22 lines (13 loc) · 1.36 KB

File metadata and controls

22 lines (13 loc) · 1.36 KB

0003 — RxJava 3 for Reactive Access

Status

Accepted

Context

Java applications (especially Android) commonly use reactive programming for async operations. The SDK needs to expose an async access pattern beyond callbacks. RxJava is the de facto reactive library for Java/Android. Version 3 is the current major version with active maintenance; RxJava 2 reached end-of-life.

Decision

RxJava 3 (io.reactivex.rxjava3:rxjava) and the Retrofit RxJava3 adapter (retrofit2:adapter-rxjava3) are included as regular (non-optional) dependencies. CDAClient.observe() returns an ObserveQuery that wraps the Retrofit call in a Flowable, enabling reactive composition. The synchronous and callback paths remain available for consumers that do not use RxJava.

Consequences

  • RxJava 3 and Retrofit's adapter are included in all deployments, adding ~3 MB to the transitive dependency footprint.
  • Consumers not using RxJava carry the dependency for no benefit — a future improvement could make it optional via a separate artifact.
  • RxJava 3 is compatible with Java 8 and Android API 21+, matching the SDK's minimum requirements.
  • Upgrading to a future RxJava major version (4+) would require updating adapter-rxjava3 and potentially changing the Flowable return type, which is a breaking API change.