Class PulsarIncomingBatchMessage<T>

java.lang.Object
io.smallrye.reactive.messaging.pulsar.PulsarIncomingBatchMessage<T>
All Implemented Interfaces:
ContextAwareMessage<List<T>>, MetadataInjectableMessage<List<T>>, PulsarBatchMessage<T>, Iterable<PulsarMessage<T>>, org.eclipse.microprofile.reactive.messaging.Message<List<T>>

public class PulsarIncomingBatchMessage<T> extends Object implements PulsarBatchMessage<T>, MetadataInjectableMessage<List<T>>
  • Constructor Details

  • Method Details

    • getPayload

      public List<T> getPayload()
      Specified by:
      getPayload in interface org.eclipse.microprofile.reactive.messaging.Message<T>
    • unwrap

      public org.apache.pulsar.client.api.Messages<T> unwrap()
    • getMessages

      public List<PulsarMessage<T>> getMessages()
      Specified by:
      getMessages in interface PulsarBatchMessage<T>
      Returns:
      list of messages contained in this message batch
    • iterator

      public Iterator<PulsarMessage<T>> iterator()
      Specified by:
      iterator in interface Iterable<T>
    • getMetadata

      public org.eclipse.microprofile.reactive.messaging.Metadata getMetadata()
      Specified by:
      getMetadata in interface org.eclipse.microprofile.reactive.messaging.Message<T>
    • ack

      public CompletionStage<Void> ack()
      Specified by:
      ack in interface org.eclipse.microprofile.reactive.messaging.Message<T>
    • getAck

      public Supplier<CompletionStage<Void>> getAck()
      Specified by:
      getAck in interface org.eclipse.microprofile.reactive.messaging.Message<T>
    • nack

      public CompletionStage<Void> nack(Throwable reason, org.eclipse.microprofile.reactive.messaging.Metadata metadata)
      Specified by:
      nack in interface org.eclipse.microprofile.reactive.messaging.Message<T>
    • getNack

      public Function<Throwable,CompletionStage<Void>> getNack()
      Specified by:
      getNack in interface org.eclipse.microprofile.reactive.messaging.Message<T>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • injectMetadata

      public void injectMetadata(Object metadataObject)
      Specified by:
      injectMetadata in interface MetadataInjectableMessage<T>