-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
440 additions
and
207 deletions.
There are no files selected for viewing
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Cluster configuration | ||
|
||
Here are some cluster configuration examples. | ||
|
||
## Simplest configuration | ||
|
||
```elixir | ||
config :my_app, MyApp.Cluster, | ||
connection: [ | ||
bootstrap_servers: ["localhost:19092", "localhost:29092"], | ||
ssl: false | ||
], | ||
topics: [[name: "my_topic_0"]] | ||
``` | ||
|
||
This cluster will connect to brokers using non ssl connection and produce messages only to topic `my_topic` using the default producer and default partitioner. | ||
|
||
## SSL and custom socket opts | ||
|
||
```elixir | ||
config :my_app, MyApp.Cluster, | ||
connection: [ | ||
bootstrap_servers: ["localhost:19092", "localhost:29092"], | ||
ssl: true, | ||
connect_opts: [ | ||
verify: :verify_peer, | ||
cacertfile: Path.relative("test/compose_files/ssl/ca.crt") | ||
], | ||
socket_opts: [delay_send: true] | ||
], | ||
topics: [[name: "my_topic_0"]] | ||
``` | ||
|
||
This cluster will connect to brokers using ssl connection, `connect_opts` and `socket_opts` are forwarded to erlang module `:ssl` in order to proper configure the socket. See the documentation for more details. | ||
|
||
## TODO: DO MORE EXAMPLES |
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
Oops, something went wrong.