Skip to content

Commit

Permalink
Merge pull request kafka4beam#547 from belltoy/fix/snappy-dep
Browse files Browse the repository at this point in the history
Remove snappyer from default dependency
  • Loading branch information
zmstone authored Jun 26, 2024
2 parents cef61de + 158734b commit 636e448
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

- 4.0.0
- Remove `snappyer` from default dependency [PR#547](https://github.com/kafka4beam/brod/pull/547).
Starting from `kafka_protocol-4.0`, it no longer requires compression libraries as rebar dependencies.
Now `brod-4.0` has it removed too.
For more compression options, see [kafka_protocol/README](https://github.com/kafka4beam/kafka_protocol/blob/master/README.md#compression-support)

- 3.19.1
- Made brod-cli to work on OTP 26. [PR#582](https://github.com/kafka4beam/brod/pull/582)
- `--ssl` option is now mandatory if TLS is to be used (previously it can be derived from `--cacertfile` option)
Expand Down
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Why "brod"? [http://en.wikipedia.org/wiki/Max_Brod](http://en.wikipedia.org/wiki
- Pick latest supported version when sending requests to kafka.
- Direct APIs for message send/fetch and cluster inspection/management without having to start clients/producers/consumers.
- A escriptized command-line tool for message send/fetch and cluster inspection/management.
- Configurable compression library. `snappy` compression is supported by default.
- Configurable compression library. No compression is supported by default for both producers and consumers.
For more compression options, see [kafka_protocol/README](https://github.com/kafka4beam/kafka_protocol/blob/master/README.md#compression-support)

## Building and testing
Expand Down Expand Up @@ -114,6 +114,19 @@ two-level supervision trees.
To use producers or consumers, you have to start at least one client that
will manage them.

### Compression

Brod does not dependent on any compression/decompression implementation by default.
To enable them, you must add the compression application as dependency in your project's rebar.config.

For example:

```erlang
{deps, [
{snappyer, "1.2.9"}
]}.
```

### Start clients by default

You may include client configs in `sys.config` have them started by default
Expand Down
10 changes: 5 additions & 5 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{deps, [ {kafka_protocol, "4.1.5"}
, {snappyer, "1.2.9"}
]}.
{deps, [{kafka_protocol, "4.1.5"}]}.
{project_plugins, [{coveralls, "~> 2.2.0"}, {rebar3_lint, "~> 3.2.5"}]}.
{edoc_opts, [{preprocess, true}, {macros, [{build_brod_cli, true}]}]}.
{erl_opts, [warnings_as_errors, warn_unused_vars,warn_shadow_vars,warn_obsolete_guard,debug_info]}.
Expand All @@ -9,8 +7,9 @@
deprecated_functions]}.
{profiles, [
{brod_cli, [
{deps, [ {docopt, {git, "https://github.com/zmstone/docopt-erl.git", {branch, "0.1.3"}}}
{deps, [ {docopt, {git, "https://github.com/zmstone/docopt-erl.git", {tag, "0.1.3"}}}
, {jsone, "1.7.0"}
, {snappyer, "1.2.9"}
]},
{erl_opts, [warnings_as_errors, {d, build_brod_cli}]},
{escript_name, brod_cli},
Expand All @@ -23,11 +22,12 @@
]}
]}]},
{test, [
{deps, [ {docopt, {git, "https://github.com/zmstone/docopt-erl.git", {branch, "0.1.3"}}}
{deps, [ {docopt, {git, "https://github.com/zmstone/docopt-erl.git", {tag, "0.1.3"}}}
, {hut, "1.3.0"}
, {jsone, "1.7.0"}
, {meck, "0.9.2"}
, {proper, "1.4.0"}
, {snappyer, "1.2.9"}
, {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe.git", {branch, "1.0.10"}}}
]},
{erl_opts, [warnings_as_errors, {d, build_brod_cli}]}
Expand Down
9 changes: 3 additions & 6 deletions rebar.lock
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{"1.2.0",
[{<<"crc32cer">>,{pkg,<<"crc32cer">>,<<"0.1.8">>},1},
{<<"kafka_protocol">>,{pkg,<<"kafka_protocol">>,<<"4.1.5">>},0},
{<<"snappyer">>,{pkg,<<"snappyer">>,<<"1.2.9">>},0}]}.
{<<"kafka_protocol">>,{pkg,<<"kafka_protocol">>,<<"4.1.5">>},0}]}.
[
{pkg_hash,[
{<<"crc32cer">>, <<"C6C2275C5FB60A95F4935D414F30B50EE9CFED494081C9B36EBB02EDFC2F48DB">>},
{<<"kafka_protocol">>, <<"D15E64994A8CA99716AB47DB4132614359AC1BFA56D6C5B4341FDC1AA4041518">>},
{<<"snappyer">>, <<"9CC58470798648CE34C662CA0AA6DAAE31367667714C9A543384430A3586E5D3">>}]},
{<<"kafka_protocol">>, <<"D15E64994A8CA99716AB47DB4132614359AC1BFA56D6C5B4341FDC1AA4041518">>}]},
{pkg_hash_ext,[
{<<"crc32cer">>, <<"251499085482920DEB6C9B7AADABF9FB4C432F96ADD97AB42AEE4501E5B6F591">>},
{<<"kafka_protocol">>, <<"C956C9357FEF493B7072A35D0C3E2BE02AA5186C804A412D29E62423BB15E5D9">>},
{<<"snappyer">>, <<"18D00CA218AE613416E6EECAFE1078DB86342A66F86277BD45C95F05BF1C8B29">>}]}
{<<"kafka_protocol">>, <<"C956C9357FEF493B7072A35D0C3E2BE02AA5186C804A412D29E62423BB15E5D9">>}]}
].
2 changes: 1 addition & 1 deletion src/brod.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[{description,"Apache Kafka Erlang client library"},
{vsn,"git"},
{registered,[]},
{applications,[kernel,stdlib,kafka_protocol,snappyer]},
{applications,[kernel,stdlib,kafka_protocol]},
{env,[]},
{mod, {brod, []}},
{modules,[]},
Expand Down

0 comments on commit 636e448

Please sign in to comment.