lib/rimless/dependencies.rb
# Set sensible defaults for the +WaterDrop+ gem.
Set sensible defaults for the +WaterDrop+ gem.
Set sensible defaults for the + WaterDrop + gem .
def configure_waterdrop
        return if Rimless.configuration.kafka_brokers.empty? \
          || Rimless.configuration.client_id.blank?
        WaterDrop.setup do |config|
          config.deliver = true
          config.logger = Rimless.logger
          config.client_id = Rimless.configuration.client_id
          config.kafka.seed_brokers = Rimless.configuration.kafka_brokers
          config.kafka.required_acks = -1
        end
      end
def configure_waterdrop return if Rimless . configuration . kafka_brokers . empty? || Rimless . configuration . client_id . blank? WaterDrop . setup do | config | config . deliver = true config . logger = Rimless . logger config . client_id = Rimless . configuration . client_id config . kafka . seed_brokers = Rimless . configuration . kafka_brokers config . kafka . required_acks = - 1 end end
Set sensible defaults for the +WaterDrop+ gem.
Set sensible defaults for the + WaterDrop + gem .
# Skip WaterDrop configuration when no brokers/client id is available, # because it will raise. Its fine to have none available for situations # like Rails asset precompilations, etc. - on runtime the settings # should be available, otherwise the message producing just # fails/raise. # Activate message delivery and use the default logger # An optional identifier of a Kafka consumer (in a consumer group) # that is passed to a Kafka broker with every request. A logical # application name to be included in Kafka logs and monitoring # aggregates. # All the known brokers, at least one. The ruby-kafka driver will # discover the whole cluster structure once and when issues occur to # dynamically adjust scaling operations. # All brokers MUST acknowledge a new message