Interface ReactiveMessageSender<T>

Type Parameters:
T - the message payload type.

public interface ReactiveMessageSender<T>
Reactive message sender interface.
  • Method Summary

    Modifier and Type
    Method
    Description
    reactor.core.publisher.Flux<MessageSendResult<T>>
    sendMany(org.reactivestreams.Publisher<MessageSpec<T>> messageSpecs)
    Send multiple messages and get the sending results in the same order as the messages sent.
    reactor.core.publisher.Mono<org.apache.pulsar.client.api.MessageId>
    sendOne(MessageSpec<T> messageSpec)
    Send one message.
  • Method Details

    • sendOne

      reactor.core.publisher.Mono<org.apache.pulsar.client.api.MessageId> sendOne(MessageSpec<T> messageSpec)
      Send one message.
      Parameters:
      messageSpec - the spec of the message to send
      Returns:
      a publisher that will emit one message id and complete
    • sendMany

      reactor.core.publisher.Flux<MessageSendResult<T>> sendMany(org.reactivestreams.Publisher<MessageSpec<T>> messageSpecs)
      Send multiple messages and get the sending results in the same order as the messages sent. The results are MessageSendResult objects composed of the message ID of the message sent and of the original message spec that was sent. A correlationMetadata can be attached to a MessageSpec and retrieved with MessageSendResult.getCorrelationMetadata() to correlate the messages sent with the results.
      Parameters:
      messageSpecs - the specs of the messages to send
      Returns:
      a publisher that will emit a MessageSendResult per message successfully sent in the order that they have been sent