zendesk/racecar

Configure producer using environment variables

jcoyne opened this issue · 2 comments

jcoyne commented

Is there a way to configure the producer using environment variables. The README doesn't specify that this can't be done, but since the producer setting is expected to be a list (https://github.com/zendesk/racecar/blob/master/lib/racecar/config.rb#L35), it's not clear to me how to go about it.

Instead I've had to configure this one setting in config/racecar.rb:

Racecar.configure do |config|
  config.producer = ['message.max.bytes=10485760']
end

racecar uses king_konf under the hood, so you can use something like this to configure the producer via env vars

export RACECAR_PRODUCER='message.max.bytes=10485760,retries=111111'
jcoyne commented

Thanks for the response @deepredsky