public interface ConsumerUpdateListener
An application uses the update(Context) callback to compute the offset to start
consuming from when the consumer becomes active.
The application can also use the update(Context) callback to store the offset of the
last message it processed when the consumer goes from active to passive.
This is especially useful when using manual server-side offset tracking or offset tracking from an external datastore.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ConsumerUpdateListener.Context
Information on the status change.
|
| Modifier and Type | Method and Description |
|---|---|
OffsetSpecification |
update(ConsumerUpdateListener.Context context)
Callback when the consumer status change.
|
OffsetSpecification update(ConsumerUpdateListener.Context context)
The method must return the offset specification to resume consumption from when the consumer becomes active. The broker will use the value to initialize the dispatching of messages from the appropriate location.
The broker ignores the returned value when the consumer becomes inactive.
context - information on the status changeCopyright © 2024 Broadcom Inc. and/or its subsidiaries. All rights reserved.