Skip to content

Commit

Permalink
PIP-118: reconnect broker when ZooKeeper session expires (#13341)
Browse files Browse the repository at this point in the history
  • Loading branch information
HQebupt authored Feb 17, 2022
1 parent d3848e2 commit 66bfa78
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions conf/broker.conf
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,7 @@ maxNumPartitionsPerPartitionedTopic=0
# There are two policies to apply when broker metadata session expires: session expired happens, "shutdown" or "reconnect".
# With "shutdown", the broker will be restarted.
# With "reconnect", the broker will keep serving the topics, while attempting to recreate a new session.
# Node: the "reconnect" policy is an experiment feature
zookeeperSessionExpiredPolicy=shutdown
zookeeperSessionExpiredPolicy=reconnect

# Enable or disable system topic
systemTopicEnabled=false
Expand Down
3 changes: 1 addition & 2 deletions deployment/terraform-ansible/templates/broker.conf
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,7 @@ maxNumPartitionsPerPartitionedTopic=0
# There are two policies when zookeeper session expired happens, "shutdown" and "reconnect".
# If uses "shutdown" policy, shutdown the broker when zookeeper session expired happens.
# If uses "reconnect" policy, try to reconnect to zookeeper server and re-register metadata to zookeeper.
# Node: the "reconnect" policy is an experiment feature
zookeeperSessionExpiredPolicy=shutdown
zookeeperSessionExpiredPolicy=reconnect

# Enable or disable system topic
systemTopicEnabled=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,7 @@ public class ServiceConfiguration implements PulsarConfiguration {
+ " With \"shutdown\", the broker will be restarted.\n\n"
+ " With \"reconnect\", the broker will keep serving the topics, while attempting to recreate a new session."
)
private MetadataSessionExpiredPolicy zookeeperSessionExpiredPolicy = MetadataSessionExpiredPolicy.shutdown;
private MetadataSessionExpiredPolicy zookeeperSessionExpiredPolicy = MetadataSessionExpiredPolicy.reconnect;

@FieldContext(
category = CATEGORY_SERVER,
Expand Down

0 comments on commit 66bfa78

Please sign in to comment.