Skip to content

Commit 5767a93

Browse files
committed
Fix snappyer as optional dependency
1 parent f9b14e8 commit 5767a93

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Why "brod"? [http://en.wikipedia.org/wiki/Max_Brod](http://en.wikipedia.org/wiki
2525
- Pick latest supported version when sending requests to kafka.
2626
- Direct APIs for message send/fetch and cluster inspection/management without having to start clients/producers/consumers.
2727
- A escriptized command-line tool for message send/fetch and cluster inspection/management.
28-
- Configurable compression library. `snappy` compression is supported by default.
28+
- Configurable compression library. No compression is supported by default for both producers and consumers.
2929
For more compression options, see [kafka_protocol/README](https://github.com/kafka4beam/kafka_protocol/blob/master/README.md#compression-support)
3030

3131
## Building and testing
@@ -114,6 +114,20 @@ two-level supervision trees.
114114
To use producers or consumers, you have to start at least one cient that
115115
will manage them.
116116

117+
### Compression
118+
119+
Brod does not dependent on any compression/decompression implementation by default.
120+
To enable them, you must add the compression application as dependency.
121+
122+
For example:
123+
124+
```erlang
125+
% rebar.config
126+
{deps, [
127+
{snappyer, "1.2.8"}
128+
].
129+
```
130+
117131
### Start clients by default
118132

119133
You may include client configs in `sys.config` have them started by default

rebar.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{deps, [ {supervisor3, "1.1.11"}
22
, {kafka_protocol, "4.1.2"}
3-
, {snappyer, "1.2.8"}
43
]}.
54
{project_plugins, [{rebar3_lint, "~> 1.0.2"}]}.
65
{edoc_opts, [{preprocess, true}, {macros, [{build_brod_cli, true}]}]}.
@@ -12,6 +11,7 @@
1211
{brod_cli, [
1312
{deps, [ {docopt, {git, "https://github.com/zmstone/docopt-erl.git", {branch, "0.1.3"}}}
1413
, {jsone, "1.7.0"}
14+
, {snappyer, "1.2.8"}
1515
]},
1616
{erl_opts, [warnings_as_errors, {d, build_brod_cli}]},
1717
{escript_name, brod_cli},
@@ -30,6 +30,7 @@
3030
, {meck, "0.9.2"}
3131
, {proper, "1.4.0"}
3232
, {snabbkaffe, "1.0.1"}
33+
, {snappyer, "1.2.8"}
3334
]},
3435
{erl_opts, [warnings_as_errors, {d, build_brod_cli}]}
3536
]}

rebar.lock

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
{"1.2.0",
22
[{<<"crc32cer">>,{pkg,<<"crc32cer">>,<<"0.1.8">>},1},
33
{<<"kafka_protocol">>,{pkg,<<"kafka_protocol">>,<<"4.1.2">>},0},
4-
{<<"snappyer">>,{pkg,<<"snappyer">>,<<"1.2.8">>},0},
54
{<<"supervisor3">>,{pkg,<<"supervisor3">>,<<"1.1.11">>},0}]}.
65
[
76
{pkg_hash,[
87
{<<"crc32cer">>, <<"C6C2275C5FB60A95F4935D414F30B50EE9CFED494081C9B36EBB02EDFC2F48DB">>},
98
{<<"kafka_protocol">>, <<"EE45DB88BD83526B1D3079DE19D5331AD7D755E549C00EC6F2CAA47C591E9588">>},
10-
{<<"snappyer">>, <<"201CE9067A33C71A6A5087C0C3A49A010B17112D461E6DF696C722DCB6D0934A">>},
119
{<<"supervisor3">>, <<"D81CDEC31D102FDE407423E1D05B569572850DEEBED86B951D5233C387CBA80B">>}]},
1210
{pkg_hash_ext,[
1311
{<<"crc32cer">>, <<"251499085482920DEB6C9B7AADABF9FB4C432F96ADD97AB42AEE4501E5B6F591">>},
1412
{<<"kafka_protocol">>, <<"04AD1A8CD2A57479907AA049489149FEBCCDDAD247338718A1A77E64F50E4B07">>},
15-
{<<"snappyer">>, <<"35518E79A28548B56D8FD6AEE2F565F12F51C2D3D053F9CFA817C83BE88C4F3D">>},
1613
{<<"supervisor3">>, <<"E6C2DEDBCABCBA24995A218ACA12DB5E208B80D3252692B22EF0F1A266104B50">>}]}
1714
].

src/brod.app.src

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[{description,"Apache Kafka Erlang client library"},
44
{vsn,"git"},
55
{registered,[]},
6-
{applications,[kernel,stdlib,kafka_protocol,supervisor3,snappyer]},
6+
{applications,[kernel,stdlib,kafka_protocol,supervisor3]},
77
{env,[]},
88
{mod, {brod, []}},
99
{modules,[]},

0 commit comments

Comments
 (0)