Created
October 18, 2016 17:52
-
-
Save lachezar/e67c700b64d95714bdaa03d3148547c1 to your computer and use it in GitHub Desktop.
sample_config_kafka_ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is responsible for configuring your application | |
# and its dependencies with the aid of the Mix.Config module. | |
use Mix.Config | |
config :kafka_ex, | |
# a list of brokers to connect to in {"HOST", port} format | |
brokers: [ | |
{"localhost", 9092} | |
], | |
# the default consumer group for worker processes, must be a binary (string) | |
# NOTE if you are on Kafka < 0.8.2 or if you want to disable the use of | |
# consumer groups, set this to :no_consumer_group (this is the | |
# only exception to the requirement that this value be a binary) | |
consumer_group: "kafka_ex", | |
auto_commit: true, | |
worker_name: :pr, | |
# Set this value to true if you do not want the default | |
# `KafkaEx.Server` worker to start during application start-up - | |
# i.e., if you want to start your own set of named workers | |
disable_default_worker: false, | |
# Timeout value, in msec, for synchronous operations (e.g., network calls) | |
sync_timeout: 3000, | |
# Supervision max_restarts - the maximum amount of restarts allowed in a time frame | |
max_restarts: 10, | |
# Supervision max_seconds - the time frame in which :max_restarts applies | |
max_seconds: 60, | |
# Options used to configure the certs for SSL connection | |
# | |
# Example: | |
# [ | |
# {:cacertfile, "cacert.pem"}, | |
# {:certfile, "cert.pem"}, | |
# {:keyfile, "cert_key.pem"}, | |
# {:password, "pass123"} | |
# ] | |
ssl_options: [], | |
kafka_version: "0.9.0" | |
env_config = Path.expand("#{Mix.env}.exs", __DIR__) | |
if File.exists?(env_config) do | |
import_config(env_config) | |
end | |
# This configuration is loaded before any dependency and is restricted | |
# to this project. If another project depends on this project, this | |
# file won't be loaded nor affect the parent project. For this reason, | |
# if you want to provide default values for your application for | |
# 3rd-party users, it should be done in your "mix.exs" file. | |
# You can configure for your application as: | |
# | |
# config :elixir_test_proj, key: :value | |
# | |
# And access this configuration in your application as: | |
# | |
# Application.get_env(:elixir_test_proj, :key) | |
# | |
# Or configure a 3rd-party app: | |
# | |
# config :logger, level: :info | |
# | |
# It is also possible to import configuration files, relative to this | |
# directory. For example, you can emulate configuration per environment | |
# by uncommenting the line below and defining dev.exs, test.exs and such. | |
# Configuration from the imported file will override the ones defined | |
# here (which is why it is important to import them last). | |
# | |
# import_config "#{Mix.env}.exs" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment