Interface Consumer<M extends Message>
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
AbstractConsumer
,BlobMessageConsumer
,BlobWatermarkMessageConsumer
,DocumentMessageConsumer
,RedisDocumentMessageConsumer
public interface Consumer<M extends Message> extends AutoCloseable
A consumer consumesMessage
by batch.- Since:
- 9.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
accept(M message)
Consume a message.void
begin()
Begin a batch of messages.void
commit()
End of the batch message.void
rollback()
Called when there is an exception duringaccept(Message)
orcommit()
.-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Method Detail
-
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 duringaccept(Message)
orcommit()
.
-
-