MCPcopy
hub / github.com/IBM/sarama

github.com/IBM/sarama @v1.50.3 sqlite

repository ↗ · DeepWiki ↗ · release v1.50.3 ↗
3,923 symbols 19,393 edges 316 files 805 documented · 21%
README

sarama

Go Reference OpenSSF Scorecard OpenSSF Best Practices

Sarama is an MIT-licensed Go client library for Apache Kafka.

Getting started

  • API documentation and examples are available via pkg.go.dev.
  • Mocks for testing are available in the mocks subpackage.
  • The examples directory contains more elaborate example applications.
  • The tools directory contains command line tools that can be useful for testing, diagnostics, and instrumentation.

You might also want to look at the Frequently Asked Questions.

Compatibility and API stability

Sarama provides a "2 releases + 2 months" compatibility guarantee: we support the two latest stable releases of Kafka and Go, and we provide a two month grace period for older releases. However, older releases of Kafka are still likely to work.

Sarama follows semantic versioning and provides API stability via the standard Go module version numbering scheme.

A changelog is available here.

Contributing

Extension points exported contracts — how you extend this code

Partitioner (Interface)
Partitioner is anything that, given a Kafka message and a number of partitions indexed [0...numPartitions-1], decides to [6 …
partitioner.go
ConsumerGroupHandler (Interface)
-------------------------------------------------------------------- ConsumerGroupHandler instances are used to handle i [9 …
consumer_group.go
MockResponse (Interface)
MockResponse is a response builder interface it defines one method that allows generating a response based on a request [45 …
mockresponses.go
BalanceStrategy (Interface)
-------------------------------------------------------------------- BalanceStrategy is used to balance topics and parti [4 …
balance_strategy.go
Consumer (Interface)
Consumer manages PartitionConsumers which process Kafka messages from brokers. You MUST call Close() on a consumer to av [2 …
consumer.go
SyncProducer (Interface)
SyncProducer publishes Kafka messages, blocking until they have been acknowledged. It routes messages to the correct bro [2 …
sync_producer.go
AccessTokenProvider (Interface)
AccessTokenProvider is the interface that encapsulates how implementors can generate access tokens for Kafka broker auth [2 …
broker.go
ProducerInterceptor (Interface)
ProducerInterceptor allows you to intercept (and possibly mutate) the records received by the producer before they are p [2 …
interceptors.go

Core symbols most depended-on inside this repo

Error
called by 812
mockresponses.go
Fatal
called by 590
mockresponses.go
Errorf
called by 485
mocks/mocks.go
BrokerID
called by 449
mockbroker.go
Addr
called by 433
mockbroker.go
Close
called by 266
mockbroker.go
NewMockBroker
called by 261
mockbroker.go
Is
called by 258
errors.go

Shape

Method 2,358
Function 1,085
Struct 381
TypeAlias 45
Interface 41
FuncType 13

Languages

Go100%

Modules by API surface

mockresponses.go182 symbols
broker.go112 symbols
admin.go96 symbols
async_producer.go95 symbols
async_producer_test.go87 symbols
consumer.go83 symbols
client.go82 symbols
consumer_group.go72 symbols
balance_strategy.go68 symbols
admin_test.go64 symbols
balance_strategy_test.go50 symbols
consumer_test.go49 symbols

Dependencies from manifests, versioned

github.com/IBM/saramav1.50.2 · 1×
github.com/cespare/xxhash/v2v2.3.0 · 1×
github.com/davecgh/go-spewv1.1.1 · 1×
github.com/go-logr/logrv1.4.3 · 1×
github.com/go-logr/stdrv1.2.2 · 1×
github.com/hashicorp/go-uuidv1.0.3 · 1×
github.com/jcmturner/aescts/v2v2.0.0 · 1×
github.com/jcmturner/dnsutils/v2v2.0.0 · 1×
github.com/jcmturner/goforkv1.7.6 · 1×
github.com/jcmturner/gokrb5/v8v8.4.4 · 1×

For agents

$ claude mcp add sarama \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact