@Version(value="1.0")
See: Description
Interface | Description |
---|---|
Emitter<T> |
Interface used to feed a channel from an imperative piece of code.
|
Message<T> |
A message envelope.
|
Class | Description |
---|---|
Metadata |
Message metadata containers.
|
Enum | Description |
---|---|
Acknowledgment.Strategy | |
OnOverflow.Strategy |
The back pressure strategy.
|
Annotation Type | Description |
---|---|
Acknowledgment |
Configure the acknowledgement policy for the given
@Incoming . |
Channel |
This qualifier indicates which channel should be injected / populated.
|
Incoming |
Used to signify a subscriber to incoming messages.
|
OnOverflow |
Configures the back pressure policy on an injected
Emitter : |
Outgoing |
Used to signify a publisher of outgoing messages.
|
Experimental
annotation.
The MicroProfile Reactive Messaging API.
This API provides a mechanism for declaring managed streams. CDI managed beans may declare methods annotated with
Incoming
and/or
Outgoing
to declare a message subscriber, publisher or processor.
The container is responsible for running, maintaining liveness, and stopping the message streams on context shutdown. Containers should implement restarting in case a stream fails, with an appropriate backoff strategy in the event of repeat failures.
The application should use Reactive Streams to provide the message stream handlers. Generally, use of
org.eclipse.microprofile.reactive.streams
builders should be used in preference to either Reactive Streams
interfaces directly, or container specific implementations of streams.
Here is an example use of this API:
@ApplicationScoped public class EmailPublisher { @Incoming("notifications") @Outgoing("emails") public ProcessorBuilder<Message<Notification>, Message<Email>> publishEmails() { return ReactiveStreams.<Message<Notification>>builder() .filter(msg -> msg.getPayload().isEmailable()) .map(msg -> { Email email = convertNotificationToEmail(msg.getPayload()); return Message.of(email, msg::ack); }); } private Email convertNotificationToEmail(Notification notification) { ... } }
Copyright © 2018–2021 SmallRye. All rights reserved.