io.smallrye.reactive:mqtt-quickstart

An implementation of the MicroProfile Reactive Streams Messaging specification

License

License

Categories

Categories

React User Interface Web Frameworks
GroupId

GroupId

io.smallrye.reactive
ArtifactId

ArtifactId

mqtt-quickstart
Last Version

Last Version

0.0.9
Release Date

Release Date

Type

Type

jar
Description

Description

An implementation of the MicroProfile Reactive Streams Messaging specification
Project Organization

Project Organization

SmallRye

Download mqtt-quickstart

How to add to project

<!-- https://jarcasting.com/artifacts/io.smallrye.reactive/mqtt-quickstart/ -->
<dependency>
    <groupId>io.smallrye.reactive</groupId>
    <artifactId>mqtt-quickstart</artifactId>
    <version>0.0.9</version>
</dependency>
// https://jarcasting.com/artifacts/io.smallrye.reactive/mqtt-quickstart/
implementation 'io.smallrye.reactive:mqtt-quickstart:0.0.9'
// https://jarcasting.com/artifacts/io.smallrye.reactive/mqtt-quickstart/
implementation ("io.smallrye.reactive:mqtt-quickstart:0.0.9")
'io.smallrye.reactive:mqtt-quickstart:jar:0.0.9'
<dependency org="io.smallrye.reactive" name="mqtt-quickstart" rev="0.0.9">
  <artifact name="mqtt-quickstart" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.smallrye.reactive', module='mqtt-quickstart', version='0.0.9')
)
libraryDependencies += "io.smallrye.reactive" % "mqtt-quickstart" % "0.0.9"
[io.smallrye.reactive/mqtt-quickstart "0.0.9"]

Dependencies

compile (15)

Group / Artifact Type Version
org.slf4j : slf4j-simple jar 1.7.26
io.smallrye : smallrye-config jar 1.3.7
io.smallrye.reactive : smallrye-reactive-messaging-provider jar 0.0.9
io.smallrye.reactive : smallrye-reactive-messaging-mqtt jar 0.0.9
io.smallrye.reactive : smallrye-reactive-streams-operators jar 1.0.3
org.jboss.weld.se : weld-se-core jar 3.1.1.Final
javax.enterprise : cdi-api jar 2.0.SP1
org.eclipse.microprofile.reactive-streams-operators : microprofile-reactive-streams-operators-api jar 1.0
org.eclipse.microprofile.reactive-streams-operators : microprofile-reactive-streams-operators-core jar 1.0
io.reactivex.rxjava2 : rxjava jar 2.2.8
io.smallrye.reactive : smallrye-reactive-converter-api jar 1.0.4
org.eclipse.microprofile.config : microprofile-config-api jar 1.3
org.apache.commons : commons-lang3 jar 3.9
org.slf4j : slf4j-api jar 1.7.26
com.fasterxml.jackson.core : jackson-databind jar 2.9.8

test (6)

Group / Artifact Type Version
io.smallrye.reactive : smallrye-reactive-converter-rxjava2 jar 1.0.4
io.smallrye.reactive : smallrye-reactive-converter-reactor jar 1.0.4
io.smallrye.reactive : smallrye-reactive-streams-vertx-execution-model jar 1.0.4
junit : junit jar 4.12
org.assertj : assertj-core jar 3.12.2
org.awaitility : awaitility jar 3.1.6

Project Modules

There are no modules declared in this project.

Maven Central Continuous Integration Build License

Implementation of the MicroProfile Reactive Messaging specification

This project is an implementation of the (next to be) Eclipse MicroProfile Reactive Messaging specification - a CDI extension to build event-driven microservices and data streaming applications. It provides support for:

It also provides a way to inject streams into CDI beans, and so link your Reactive Messaging streams into CDI beans,or JAX-RS resources.

Getting started

Prerequisites

See PREREQUISITES.md for details.

The build process requires Apache Maven and Java 8+ and can be performed using:

mvn clean install

How to start

The best way to start is to look at the examples/quickstart project. It's a Maven project listing the minimal set of dependencies and containing a single class:

package io.smallrye.reactive.messaging.quickstart;

import org.eclipse.microprofile.reactive.messaging.Incoming;
import org.eclipse.microprofile.reactive.messaging.Outgoing;
import org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder;
import org.eclipse.microprofile.reactive.streams.operators.ReactiveStreams;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.se.SeContainerInitializer;

@ApplicationScoped
public class QuickStart {

  public static void main(String[] args) {
    SeContainerInitializer.newInstance().initialize();
  }


  @Outgoing("source")
  public PublisherBuilder<String> source() {
    return ReactiveStreams.of("hello", "with", "SmallRye", "reactive", "message");
  }

  @Incoming("source")
  @Outgoing("processed-a")
  public String toUpperCase(String payload) {
    return payload.toUpperCase();
  }

  @Incoming("processed-a")
  @Outgoing("processed-b")
  public PublisherBuilder<String> filter(PublisherBuilder<String> input) {
    return input.filter(item -> item.length() > 4);
  }

  @Incoming("processed-b")
  public void sink(String word) {
    System.out.println(">> " + word);
  }

}

Run the project with: mvn compile exec:java -Dexec.mainClass=io.smallrye.reactive.messaging.quickstart.QuickStart:

>> HELLO
>> SMALLRYE
>> REACTIVE
>> MESSAGE

Built With

Contributing

Please read CONTRIBUTING.md for details, and the process for submitting pull requests.

Sponsors

The project is sponsored by Red Hat.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

io.smallrye.reactive

SmallRye

Versions

Version
0.0.9