Package io.micronaut.nats.reactive
Class ReactorReactivePublisher
java.lang.Object
io.micronaut.nats.reactive.ReactorReactivePublisher
- All Implemented Interfaces:
ReactivePublisher
@Internal
@EachBean(io.nats.client.Connection.class)
public class ReactorReactivePublisher
extends Object
implements ReactivePublisher
- Author:
- jgrimm
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<Void>
publish
(io.nats.client.Message message) Publish the message with the provided arguments and return a reactive type that completes successfully when the message is published.org.reactivestreams.Publisher<io.nats.client.Message>
publishAndReply
(io.nats.client.Message message) Publish the message with the provided arguments and return a reactive type that completes successfully when the reply is received from the reply to queue.
-
Constructor Details
-
ReactorReactivePublisher
public ReactorReactivePublisher(@Parameter io.nats.client.Connection connection) Constructor.- Parameters:
connection
- The given connection
-
-
Method Details
-
publish
Description copied from interface:ReactivePublisher
Publish the message with the provided arguments and return a reactive type that completes successfully when the message is published.- Specified by:
publish
in interfaceReactivePublisher
- Parameters:
message
- The message to publish- Returns:
- the publisher
-
publishAndReply
public org.reactivestreams.Publisher<io.nats.client.Message> publishAndReply(io.nats.client.Message message) Description copied from interface:ReactivePublisher
Publish the message with the provided arguments and return a reactive type that completes successfully when the reply is received from the reply to queue.- Specified by:
publishAndReply
in interfaceReactivePublisher
- Parameters:
message
- The message to publish- Returns:
- The publisher of the received reply
-