Skip to content

dobrynya/reajames

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReaJaMeS is JMS in terms of Reactive Streams

Codacy Badge Codacy Badge Travis

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)
)

About

JMS in the terms of Reactive Streams

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages