ReaJaMeS is JMS in terms of Reactive Streams
The project is aimed to implementing a JMS client in terms of the Reactive Streams. Anyone can use the library for integrating JMS transport as non-blocking reactive streams identical to other RS implementations.
More details in wiki. Ideas, improvements are welcome as well as crytical analysis. I will be really appreciated.
To subscribe a listener for a queue
import ru.reajames._
import javax.jms.ConnectionFactory
import concurrent.ExecutionContext.Implicits.global
def connectionFactory: ConnectionFactory
new JmsReceiver(new ConnectionHolder(connectionFactory), Queue("in-queue"))
.subscribe(new OnNextSubscriber(message => println(message)))
To send text messages to a topic
import ru.reajames._
import javax.jms.ConnectionFactory
import concurrent.ExecutionContext.Implicits.global
def connectionFactory: ConnectionFactory
def publisher: Publisher[String]
publisher.subscribe(
new JmsSender(new ConnectionHolder(connectionFactory), Topic("events"), string2textMessage)
)