Class ConsumerSettings.Builder
java.lang.Object
com.here.platform.data.client.settings.ConsumerSettings.Builder
- Enclosing class:
- ConsumerSettings
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()withConsumerId(String consumerId) Subscribe for earliest offset (old) available for selected group name.withGroupName(String groupName) Subscribe only to new partitions.The offset is manually controlled by user trough [SubscriptionControl.acknowledge] and [SubscriptionControl.checkpoint], starting from the latest available offsets if no previous offsets were committed.The offset is manually controlled by user trough [SubscriptionControl.acknowledge] and [SubscriptionControl.checkpoint], starting from the earliest available offsets if no previous offsets were committed.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
-
withConsumerId
- Parameters:
consumerId- The ID to use to identify this consumer. It must be unique within the consumer group. If you do not provide one, the system will generate one. This parameter is applicable only for http-connector.- Returns:
- builder
- See Also:
-
withEarliestOffset
Subscribe for earliest offset (old) available for selected group name. For already existent group name, all partitions since last checkpoint will be returned. For new group name, all partitions available.- Returns:
- builder
-
withGroupName
- Parameters:
groupName- name of a consumer group. A string that uniquely identifies the group of consumer processes to which this consumer belongs. By setting the same group name multiple processes indicate that they are all part of the same consumer group. Maximum length of this field is 1000 characters.- Returns:
- builder
- See Also:
-
withLatestOffset
Subscribe only to new partitions. Any previous data published prior to the subscription will be skipped. Use this offset if you are interested only into new partitions.LatestOffset completely ignore previously existing checkpoint for same groupName, all leases are created with the latest offset available. This means that during the stream partitions id re-balance between workers, there is no guarantee that all events will be processed.
- Returns:
- builder
-
withManualLatestOffset
The offset is manually controlled by user trough [SubscriptionControl.acknowledge] and [SubscriptionControl.checkpoint], starting from the latest available offsets if no previous offsets were committed.This setting cannot be used with FlinkQueryApi subscribe method, because there is no interface that allows to acknowledge partitions manually.
- Returns:
- builder
-
withManualOffset
The offset is manually controlled by user trough [SubscriptionControl.acknowledge] and [SubscriptionControl.checkpoint], starting from the earliest available offsets if no previous offsets were committed.This setting cannot be used with FlinkQueryApi subscribe method, because there is no interface that allows to acknowledge partitions manually.
- Returns:
- builder
-