reactor-scala-extensions

A scala extensions for Project Reactor Flux and Mono so that the code can be fluently used in Scala

License

License

Categories

Categories

Scala Languages React User Interface Web Frameworks Reactor Container Microservices Reactive libraries
GroupId

GroupId

io.projectreactor
ArtifactId

ArtifactId

reactor-scala-extensions_2.13
Last Version

Last Version

0.8.0
Release Date

Release Date

Type

Type

jar
Description

Description

reactor-scala-extensions
A scala extensions for Project Reactor Flux and Mono so that the code can be fluently used in Scala
Project URL

Project URL

https://github.com/reactor/reactor-scala-extensions
Project Organization

Project Organization

io.projectreactor
Source Code Management

Source Code Management

https://github.com/reactor/reactor-scala-extensions

Download reactor-scala-extensions_2.13

How to add to project

<!-- https://jarcasting.com/artifacts/io.projectreactor/reactor-scala-extensions_2.13/ -->
<dependency>
    <groupId>io.projectreactor</groupId>
    <artifactId>reactor-scala-extensions_2.13</artifactId>
    <version>0.8.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.projectreactor/reactor-scala-extensions_2.13/
implementation 'io.projectreactor:reactor-scala-extensions_2.13:0.8.0'
// https://jarcasting.com/artifacts/io.projectreactor/reactor-scala-extensions_2.13/
implementation ("io.projectreactor:reactor-scala-extensions_2.13:0.8.0")
'io.projectreactor:reactor-scala-extensions_2.13:jar:0.8.0'
<dependency org="io.projectreactor" name="reactor-scala-extensions_2.13" rev="0.8.0">
  <artifact name="reactor-scala-extensions_2.13" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.projectreactor', module='reactor-scala-extensions_2.13', version='0.8.0')
)
libraryDependencies += "io.projectreactor" % "reactor-scala-extensions_2.13" % "0.8.0"
[io.projectreactor/reactor-scala-extensions_2.13 "0.8.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.13.2
io.projectreactor : reactor-core jar 3.3.8.RELEASE

test (5)

Group / Artifact Type Version
io.micrometer : micrometer-core jar 1.5.1
org.mockito : mockito-scala_2.13 jar 1.14.3
org.scalatest : scalatest_2.13 jar 3.1.2
io.projectreactor : reactor-test jar 3.3.8.RELEASE
org.mockito : mockito-inline jar 3.3.3

Project Modules

There are no modules declared in this project.

Reactor Scala Extensions

Join the chat at https://gitter.im/reactor/reactor-scala-extensions Reactor Scala Extensions Latest Download

Build Status codecov

Average time to resolve an issue Percentage of issues still open

This project is a Scala extension for reactor-core.

Using reactor-core project as it is in scala code will look ugly because a lot of methods use Java 8 lambda which is not compatible with Scala lambda. This will force Scala code to use anonymous class which turns ugly.

So instead of

val mono = Mono.just(1)
               .map(new java.util.function.Function[Int, String] {
                   def apply(t: Int): String = t.toString
               })

it becomes

val mono = SMono.just(1).map(_.toString)

This extension will also return scala's scala.collection.immutable.Stream instead of Java's java.util.stream.Stream and scala.concurrent.Future instead of java.util.concurrent.CompletableFuture

Getting it

With SBT:

libraryDependencies += "io.projectreactor" %% "reactor-scala-extensions" % "0.7.0"

With Gradle:

repositories {
    //maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
    mavenCentral()
}

dependencies {
    //compile "io.projectreactor:reactor-scala-extensions_2.12:0.7.1-SNAPSHOT
    //compile "io.projectreactor:reactor-scala-extensions_2.13:0.7.0 //for scala 2.13
    compile "io.projectreactor:reactor-scala-extensions_2.12:0.7.0 //for scala 2.12
    //compile "io.projectreactor:reactor-scala-extensions_2.11:0.7.0 //for scala 2.11
}

With Maven:

<!-- To get latest SNAPSHOT version from Sonatype
<repositories>
    <repository>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
        <id>ossSonatypeSnapshot</id>
        <name>OSS Sonatype Snapshots</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        <layout>default</layout>
    </repository>
 </repositories>

<dependency>
    <groupId>io.projectreactor</groupId>
    <artifactId>reactor-scala-extensions</artifactId>
    <version>0.7.1-SNAPSHOT</version>
</dependency>
-->
<dependency>
    <groupId>io.projectreactor</groupId>
    <artifactId>reactor-scala-extensions_2.12</artifactId> <!-- for scala 2.12 -->
    <!--<artifactId>reactor-scala-extensions_2.11</artifactId> for scala 2.11 -->
    <!--<artifactId>reactor-scala-extensions_2.13</artifactId> for scala 2.13 -->
    <version>0.7.0</version>
</dependency>

Contributing

Contributions are welcome. Simply fork this project, make some modification, push and create a pull request.

io.projectreactor

Reactor

Reactive Streams based projects for backpressure-ready asynchronous message passing.

Versions

Version
0.8.0
0.7.1
0.7.0
0.6.1
0.6.0
0.5.1
0.5.0