Interface Consumer<M extends Message>

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
AbstractConsumer, BlobMessageConsumer, BlobWatermarkMessageConsumer, DocumentMessageConsumer

public interface Consumer<M extends Message> extends AutoCloseable
A consumer consumes Message by batch.
Since:
9.1
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(M message)
    Consume a message.
    void
    Begin a batch of messages.
    void
    End of the batch message.
    void
    Called when there is an exception during accept(Message) or commit().

    Methods inherited from interface java.lang.AutoCloseable

    close
  • Method Details

    • begin

      void begin()
      Begin a batch of messages.
    • accept

      void accept(M message)
      Consume a message.
    • commit

      void commit()
      End of the batch message.
    • rollback

      void rollback()
      Called when there is an exception during accept(Message) or commit().