Class CloseOptions
java.lang.Object
org.apache.kafka.streams.CloseOptions
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum to specify the group membership operation upon closing the Kafka Streams application.Method Summary
Modifier and TypeMethodDescriptionstatic CloseOptionsStatic method to create aCloseOptionswith a specified group membership operation.static CloseOptionsStatic method to create aCloseOptionswith a custom timeout.Fluent method to set the group membership operation upon shutdown.withTimeout(Duration timeout) Fluent method to set the timeout for the close process.
Method Details
timeout
Static method to create aCloseOptionswith a custom timeout.- Parameters:
timeout- the maximum time to wait for the KafkaStreams to close.- Returns:
- a new
CloseOptionsinstance with the specified timeout.
groupMembershipOperation
public static CloseOptions groupMembershipOperation(CloseOptions.GroupMembershipOperation operation) Static method to create aCloseOptionswith a specified group membership operation.- Parameters:
operation- the group membership operation to apply. Must be one ofLEAVE_GROUP,REMAIN_IN_GROUP.- Returns:
- a new
CloseOptionsinstance with the specified group membership operation.
withTimeout
Fluent method to set the timeout for the close process.- Parameters:
timeout- the maximum time to wait for the KafkaStreams to close. Ifnull, the default timeout will be used.- Returns:
- this
CloseOptionsinstance.
withGroupMembershipOperation
Fluent method to set the group membership operation upon shutdown.- Parameters:
operation- the group membership operation to apply. Must be one ofLEAVE_GROUP,REMAIN_IN_GROUP.- Returns:
- this
CloseOptionsinstance.