lib/waterdrop/config.rb in waterdrop-2.7.0 vs lib/waterdrop/config.rb in waterdrop-2.7.3
- old
+ new
@@ -28,11 +28,11 @@
# instrumentation or loggers. It is not the kafka client id. It is an id that should be
# unique for each of the producers
setting(
:id,
default: false,
- constructor: ->(id) { id || SecureRandom.hex(6) }
+ constructor: ->(id) { id || "waterdrop-#{SecureRandom.hex(6)}" }
)
# option [Instance] logger that we want to use
# @note Due to how rdkafka works, this setting is global for all the producers
setting(
:logger,
@@ -70,9 +70,13 @@
# option [Numeric] How long to wait before retrying a retryable transaction related error
setting :wait_backoff_on_transaction_command, default: 500
# option [Numeric] How many times to retry a retryable transaction related error before
# giving up
setting :max_attempts_on_transaction_command, default: 5
+ # When a fatal transactional error occurs, should we close and recreate the underlying producer
+ # to keep going or should we stop. Since we will open a new instance and the failed transaction
+ # anyhow rolls back, we should be able to safely reload.
+ setting :reload_on_transaction_fatal_error, default: true
# option [Boolean] should we send messages. Setting this to false can be really useful when
# testing and or developing because when set to false, won't actually ping Kafka but will
# run all the validations, etc
setting :deliver, default: true