Skip to content

Commit

Permalink
README&docs: mention kadm
Browse files Browse the repository at this point in the history
  • Loading branch information
twmb committed Oct 17, 2021
1 parent d0a4492 commit 54f3092
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ This library attempts to provide an intuitive API while interacting with Kafka t
- SSL/TLS provided through custom dialer options
- All SASL mechanisms supported (GSSAPI/Kerberos, PLAIN, SCRAM, and OAUTHBEARER)
- Low-level admin functionality supported through a simple `Request` function
- High-level admin package with many helper types to make cluster administration easy.
- Utilizes modern & idiomatic Go (support for contexts, variadic configuration options, ...)
- Highly performant by avoiding channels and goroutines where not necessary
- Written in pure Go (no wrapper lib for a C library or other bindings)
Expand Down
14 changes: 14 additions & 0 deletions docs/admin-requests.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Admin Requests

This repo provides two ways to issue admin requests: a high level [kadm][a]
package, and a low level [kmsg][b] package. The kadm package is an opinionated
package that attempts to abstract the low level details of administrating into
some intuitive methods and types that have many helper functions. If you see a
type that could have more helper functions, please create a pull request.

[a]: https://pkg.go.dev/github.com/twmb/franz-go/pkg/kadm
[b]: https://pkg.go.dev/github.com/twmb/franz-go/pkg/kmsg

Not all of the low level API can be encapsulated in a high level API, and the
kadm package must sacrifice some details to make things easier to use. If the
kadm package does not give you the control you need, the low level kadm package
allows you to construct requests to Kafka directly.

All Kafka requests and responses are supported through generated code in the
kmsg package. The package aims to provide some relatively comprehensive
documentation (at least more than Kafka itself provides), but may be lacking
Expand Down
9 changes: 9 additions & 0 deletions docs/producing-and-consuming.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,15 @@ If you rely on the default options and do not commit yourself, all of this is
automatically handled. My recommendation is to just set a custom
`CommitCallback` if you need to and to rely on the default commit behavior.

##### Direct offset management outside of a group

You can use the `ConsumePartitions` option to assign partitions manually and
consume outside of the context of a group. If you want to use Kafka to manage
group offsets even with direct partition assignment, this repo provides a
`kadm` package to easily manage offsets via an admin interface. Check the
[`manual_committing`](../examples/manual_committing) example to see some
example code for how to do this.

##### Without transactions

There are two easy patterns to success for offset management in a normal
Expand Down

0 comments on commit 54f3092

Please sign in to comment.