lib/messaging/config.rb in messaging-3.6.1 vs lib/messaging/config.rb in messaging-3.6.2
- old
+ new
@@ -1,58 +1,58 @@
module Messaging
class Config
extend ::Dry::Configurable
- setting :app_name, default: 'messaging', reader: true
+ setting :app_name, 'messaging', reader: true
- setting(:error_handlers, default: [], reader: true) { |value| Array(value) }
+ setting(:error_handlers, [], reader: true) { |value| Array(value) }
- setting :background_job_handler, default: ->(message, handler_name) { handler_name.constantize.call(message) }, reader: true
+ setting :background_job_handler, ->(message, handler_name) { handler_name.constantize.call(message) }, reader: true
- setting :logger, default: Logger.new(STDOUT), reader: true
+ setting :logger, Logger.new(STDOUT), reader: true
setting :consumer, reader: true do
- setting :adapter, default: :kafka
- setting(:middlewares, default: []) { |value| Array(value) }
+ setting :adapter, :kafka
+ setting(:middlewares, []) { |value| Array(value) }
end
setting :dispatcher, reader: true do
- setting :adapter, default: :kafka
- setting(:middlewares, default: []) { |value| Array(value) }
+ setting :adapter, :kafka
+ setting(:middlewares, []) { |value| Array(value) }
end
setting :message_store, reader: true do
- setting :adapter, default: :postgres
- setting(:middlewares, default: []) { |value| Array(value) }
+ setting :adapter, :postgres
+ setting(:middlewares, []) { |value| Array(value) }
end
setting :kafka, reader: true do
- setting :log_level, default: :warn
- setting :pause_timeout, default: 10
+ setting :log_level, :warn
+ setting :pause_timeout, 10
setting :client do
- setting :seed_brokers, default: ['localhost:9092']
+ setting :seed_brokers, ['localhost:9092']
setting :connect_timeout
setting :socket_timeout
setting :ssl_ca_certs_from_system
setting :sasl_plain_username
setting :sasl_plain_password
- setting :ssl_ca_cert, default: ENV['KAFKA_SSL_CA']
- setting :ssl_client_cert, default: ENV['KAFKA_SSL_CERTIFICATE']
- setting :ssl_client_cert_key, default: ENV['KAFKA_SSL_KEY']
+ setting :ssl_ca_cert, ENV['KAFKA_SSL_CA']
+ setting :ssl_client_cert, ENV['KAFKA_SSL_CERTIFICATE']
+ setting :ssl_client_cert_key, ENV['KAFKA_SSL_KEY']
end
setting :consumer do
- setting :session_timeout, default: 30
- setting :offset_commit_interval, default: 10
- setting :offset_commit_threshold, default: 0
- setting :heartbeat_interval, default: 10
+ setting :session_timeout, 30
+ setting :offset_commit_interval, 10
+ setting :offset_commit_threshold, 0
+ setting :heartbeat_interval, 10
end
setting :producer do
- setting :max_queue_size, default: 5_000
- setting :delivery_threshold, default: 10
- setting :delivery_interval, default: 0.05
+ setting :max_queue_size, 5_000
+ setting :delivery_threshold, 10
+ setting :delivery_interval, 0.05
end
end
class << self
def setup