Sarama is a Go library for Apache Kafka 0.8, and up.
Clone or download
bai Merge pull request #1240 from mkaminski1988/master
Implement SASL/OAUTHBEARER support
Latest commit 0a21d90 Jan 11, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Enable CLA bot Oct 19, 2018
examples Fix tiny typo in examples README link Mar 12, 2017
mocks fix race condition in mock async producer Sep 26, 2018
tools Fix config for calling NewSyncProducer() Dec 15, 2016
vagrant Fix CI script with new mirror URL Nov 28, 2018
.gitignore Addressing feeback Jul 12, 2018
.travis.yml When running go fmt, match all Golang patch versions Nov 28, 2018
CHANGELOG.md changelog for 1.20.1 release (#1251) Jan 10, 2019
LICENSE Technically Shopify owns the repo Apr 2, 2018
Makefile CI test fixes Sep 27, 2018
README.md Switch from png to svg for GoDoc link in README Dec 26, 2018
Vagrantfile Use sensible heap size for JVMs in Vagrant Oct 25, 2016
acl_bindings.go add Describe/Create/DeleteAcls Dec 21, 2017
acl_create_request.go add Describe/Create/DeleteAcls Dec 21, 2017
acl_create_request_test.go add Describe/Create/DeleteAcls Dec 21, 2017
acl_create_response.go add Describe/Create/DeleteAcls Dec 21, 2017
acl_create_response_test.go add Describe/Create/DeleteAcls Dec 21, 2017
acl_delete_request.go add Describe/Create/DeleteAcls Dec 21, 2017
acl_delete_request_test.go add Describe/Create/DeleteAcls Dec 21, 2017
acl_delete_response.go add Describe/Create/DeleteAcls Dec 21, 2017
acl_delete_response_test.go add Describe/Create/DeleteAcls Dec 21, 2017
acl_describe_request.go add Describe/Create/DeleteAcls Dec 21, 2017
acl_describe_request_test.go add Describe/Create/DeleteAcls Dec 21, 2017
acl_describe_response.go add Describe/Create/DeleteAcls Dec 21, 2017
acl_describe_response_test.go add Describe/Create/DeleteAcls Dec 21, 2017
acl_filter.go add Describe/Create/DeleteAcls Dec 21, 2017
acl_types.go add Describe/Create/DeleteAcls Dec 21, 2017
add_offsets_to_txn_request.go add transaction-related request/responses (22, 24, 25, 26, 28) Jan 25, 2018
add_offsets_to_txn_request_test.go add transaction-related request/responses (22, 24, 25, 26, 28) Jan 25, 2018
add_offsets_to_txn_response.go add transaction-related request/responses (22, 24, 25, 26, 28) Jan 25, 2018
add_offsets_to_txn_response_test.go add transaction-related request/responses (22, 24, 25, 26, 28) Jan 25, 2018
add_partitions_to_txn_request.go add transaction-related request/responses (22, 24, 25, 26, 28) Jan 25, 2018
add_partitions_to_txn_request_test.go add transaction-related request/responses (22, 24, 25, 26, 28) Jan 25, 2018
add_partitions_to_txn_response.go add transaction-related request/responses (22, 24, 25, 26, 28) Jan 25, 2018
add_partitions_to_txn_response_test.go add transaction-related request/responses (22, 24, 25, 26, 28) Jan 25, 2018
admin.go feat: add Timeout for ClusterAdmin Jul 29, 2018
admin_test.go support of admin operations in sarama Jun 15, 2018
alter_configs_request.go Add Describe + AlterConfigs (#1014) Feb 3, 2018
alter_configs_request_test.go Fix flaky TestAlterConfigsRequest Feb 13, 2018
alter_configs_response.go Add Describe + AlterConfigs (#1014) Feb 3, 2018
alter_configs_response_test.go Add Describe + AlterConfigs (#1014) Feb 3, 2018
api_versions_request.go Fix race in broker version check Jun 17, 2016
api_versions_request_test.go Add support for latest protocol messages Jun 9, 2016
api_versions_response.go Following Golint tips for if blocks who ends with a return Feb 9, 2017
api_versions_response_test.go Add support for decoding versioned responses Jun 9, 2016
async_producer.go Revert to individual msg retries for non-idempotent Oct 30, 2018
async_producer_test.go Revert to individual msg retries for non-idempotent Oct 30, 2018
balance_strategy.go Better documentation, extend test timeout Sep 27, 2018
balance_strategy_test.go Implement a higher-level consumer group Sep 27, 2018
broker.go Make changes according to JP's last round of feedback Jan 8, 2019
broker_test.go Make changes according to JP's last round of feedback Jan 8, 2019
client.go Idempotent Producer - batch retry logic Oct 1, 2018
client_test.go Fix test Jul 3, 2018
client_tls_test.go Support Go 1.11 Sep 26, 2018
compress.go Reuse compression writer objects Oct 5, 2018
config.go Move extensions from configuration to access token struct Jan 7, 2019
config_resource_type.go Add Describe + AlterConfigs (#1014) Feb 3, 2018
config_test.go Move extensions from configuration to access token struct Jan 7, 2019
consumer.go Fix block on control messages Jun 14, 2018
consumer_group.go fixed the function call with changed parameter ordering Nov 28, 2018
consumer_group_members.go fixed some typo and added some comments Nov 28, 2018
consumer_group_members_test.go Formating all files with gofmt -s Feb 7, 2017
consumer_group_test.go CI test fixes Sep 27, 2018
consumer_metadata_request.go fixed some typo and added some comments Nov 28, 2018
consumer_metadata_request_test.go refactor ConsumerMetadataRequest/Response to FindCoordinatorRequest/R… Dec 20, 2017
consumer_metadata_response.go simple typo fixes in consumer metadata response file Dec 27, 2018
consumer_metadata_response_test.go remove deprecated fields Jan 25, 2018
consumer_test.go Unblock consumer when receiving invalid FetchResponse Apr 24, 2018
crc32_field.go Make polynomial a type Oct 25, 2017
create_partitions_request.go factor out getStringLength, use putArrayLength Dec 5, 2017
create_partitions_request_test.go add create partitions Dec 4, 2017
create_partitions_response.go add create partitions Dec 4, 2017
create_partitions_response_test.go add create partitions Dec 4, 2017
create_topics_request.go add CreateTopicsRequest/Response Dec 20, 2017
create_topics_request_test.go add CreateTopicsRequest/Response Dec 20, 2017
create_topics_response.go add CreateTopicsRequest/Response Dec 20, 2017
create_topics_response_test.go add CreateTopicsRequest/Response Dec 20, 2017
decompress.go Reuse compression writer objects Oct 5, 2018
delete_groups_request.go Add support for DeleteGroups May 3, 2018
delete_groups_request_test.go Add support for DeleteGroups May 3, 2018
delete_groups_response.go Use native time type for ThrottleTime May 4, 2018
delete_groups_response_test.go Use native time type for ThrottleTime May 4, 2018
delete_records_request.go Add DeleteRecords operation to Broker Feb 9, 2018
delete_records_request_test.go Add DeleteRecords operation to Broker Feb 9, 2018
delete_records_response.go Add DeleteRecords operation to Broker Feb 9, 2018
delete_records_response_test.go Add DeleteRecords operation to Broker Feb 9, 2018
delete_topics_request.go Added support for DeleteTopicsRequest V1 Feb 14, 2018
delete_topics_request_test.go Added support for DeleteTopicsRequest V1 Feb 14, 2018
delete_topics_response.go add DeleteTopicsRequest/Response Dec 21, 2017
delete_topics_response_test.go add DeleteTopicsRequest/Response Dec 21, 2017
describe_configs_request.go Implement DescribeConfigsRequest v1 & v2 Dec 3, 2018
describe_configs_request_test.go Implement DescribeConfigsRequest v1 & v2 Dec 3, 2018
describe_configs_response.go Implement DescribeConfigsResponse 1 & 2 Dec 3, 2018
describe_configs_response_test.go Implement DescribeConfigsResponse 1 & 2 Dec 3, 2018
describe_groups_request.go Fix race in broker version check Jun 17, 2016
describe_groups_request_test.go Add tests for all new request types. Dec 8, 2015
describe_groups_response.go Following Golint tips for if blocks who ends with a return Feb 9, 2017
describe_groups_response_test.go Add support for decoding versioned responses Jun 9, 2016
dev.yml Support Go 1.11 Sep 26, 2018
encoder_decoder.go Expose producer metrics with go-metrics Oct 25, 2016
end_txn_request.go add transaction-related request/responses (22, 24, 25, 26, 28) Jan 25, 2018
end_txn_request_test.go add transaction-related request/responses (22, 24, 25, 26, 28) Jan 25, 2018
end_txn_response.go add transaction-related request/responses (22, 24, 25, 26, 28) Jan 25, 2018
end_txn_response_test.go add transaction-related request/responses (22, 24, 25, 26, 28) Jan 25, 2018
errors.go add error codes 61-72 Oct 11, 2018
fetch_request.go Add missing Kafka versions Feb 13, 2018
fetch_request_test.go Add support for Kafka 0.11 in consumer Oct 31, 2017
fetch_response.go fix typo in deprecation notice for Records Dec 26, 2018
fetch_response_test.go Handle overflow-only batch Aug 16, 2018
find_coordinator_request.go refactor ConsumerMetadataRequest/Response to FindCoordinatorRequest/R… Dec 20, 2017
find_coordinator_request_test.go refactor ConsumerMetadataRequest/Response to FindCoordinatorRequest/R… Dec 20, 2017
find_coordinator_response.go remove rack from FindCoordinatorResponse and hardcode Broker-decode/e… Feb 14, 2018
find_coordinator_response_test.go remove rack from FindCoordinatorResponse and hardcode Broker-decode/e… Feb 14, 2018
functional_client_test.go Stop test if client.Coordinator fails somehow Oct 25, 2016
functional_consumer_group_test.go CI test fixes Sep 27, 2018
functional_consumer_test.go Idempotent Producer - batch retry logic Oct 1, 2018
functional_offset_manager_test.go OffsetManager: match upstream mark/next behaviour Jul 26, 2016
functional_producer_test.go Expose request latency metric Nov 22, 2016
functional_test.go Fix version.satisfies so all tests run against 0.9 Nov 26, 2015
heartbeat_request.go Fix race in broker version check Jun 17, 2016
heartbeat_request_test.go Add tests for all new request types. Dec 8, 2015
heartbeat_response.go Following Golint tips for if blocks who ends with a return Feb 9, 2017
heartbeat_response_test.go Add support for decoding versioned responses Jun 9, 2016
init_producer_id_request.go add transaction-related request/responses (22, 24, 25, 26, 28) Jan 25, 2018
init_producer_id_request_test.go add transaction-related request/responses (22, 24, 25, 26, 28) Jan 25, 2018
init_producer_id_response.go add transaction-related request/responses (22, 24, 25, 26, 28) Jan 25, 2018
init_producer_id_response_test.go add transaction-related request/responses (22, 24, 25, 26, 28) Jan 25, 2018
join_group_request.go Added versioning for join-group requests and responses May 3, 2018
join_group_request_test.go Added versioning for join-group requests and responses May 3, 2018
join_group_response.go Added versioning for join-group requests and responses May 3, 2018
join_group_response_test.go Added versioning for join-group requests and responses May 3, 2018
leave_group_request.go Fix race in broker version check Jun 17, 2016
leave_group_request_test.go Add tests for all new request types. Dec 8, 2015
leave_group_response.go Following Golint tips for if blocks who ends with a return Feb 9, 2017
leave_group_response_test.go Add support for decoding versioned responses Jun 9, 2016
length_field.go Fix partial messages handling Aug 10, 2018
list_groups_request.go Fix race in broker version check Jun 17, 2016
list_groups_request_test.go Add tests for all new request types. Dec 8, 2015
list_groups_response.go Following Golint tips for if blocks who ends with a return Feb 9, 2017
list_groups_response_test.go Add support for decoding versioned responses Jun 9, 2016
message.go Reuse compression writer objects Oct 5, 2018
message_set.go Handle overflow-only batch Aug 16, 2018
message_test.go Revert "Add workaround for an empty zstd message" Oct 2, 2018
metadata_request.go Fix metadata requests on later versions Jul 16, 2018
metadata_request_test.go Added support for Metadata Request/Response up to v5 Mar 20, 2018
metadata_response.go add missing error check Sep 26, 2018
metadata_response_test.go Added support for Metadata Request/Response up to v5 Mar 20, 2018
metrics.go Expose producer metrics with go-metrics Oct 25, 2016
metrics_test.go Expose producer metrics with go-metrics Oct 25, 2016
mockbroker.go Add NewMockBrokerListener() so that it's possible to test TLS connect… Jan 9, 2018
mockresponses.go Add more documentation and increase test coverage Jan 8, 2019
offset_commit_request.go Add support for newer OffsetCommit request/response Oct 24, 2018
offset_commit_request_test.go Add support for newer OffsetCommit request/response Oct 24, 2018
offset_commit_response.go Add support for newer OffsetCommit request/response Oct 24, 2018
offset_commit_response_test.go Add support for newer OffsetCommit request/response Oct 24, 2018
offset_fetch_request.go Added OffsetFetch support up to v5 Dec 5, 2018
offset_fetch_request_test.go Added OffsetFetch support up to v5 Dec 5, 2018
offset_fetch_response.go Added OffsetFetch support up to v5 Dec 5, 2018
offset_fetch_response_test.go Added OffsetFetch support up to v5 Dec 5, 2018
offset_manager.go Fix race Sep 27, 2018
offset_manager_test.go Fix test race Jul 20, 2018
offset_request.go Use a boolean to check that replica ID was set Oct 26, 2018
offset_request_test.go Add a getter for replica ID Oct 26, 2018
offset_response.go Add missing Kafka versions Feb 13, 2018
offset_response_test.go Support ListOffsetRequest v1 [KIP-79] Oct 31, 2016
packet_decoder.go add create partitions Dec 4, 2017
packet_encoder.go add create partitions Dec 4, 2017
partitioner.go update name of partitioner option so it makes more sense Jun 15, 2018
partitioner_test.go Make Partitioner.RequiresConsistency vary per-message Jun 14, 2018
prep_encoder.go add create partitions Dec 4, 2017
produce_request.go Expose Records union fields Feb 13, 2018
produce_request_test.go Fix TestProduceRequest Feb 13, 2018
produce_response.go Added support for Idempotent Producer Oct 1, 2018
produce_response_test.go Support ProduceResponse v1 and v2 encoding Oct 19, 2017
produce_set.go Merge pull request #1141 from adwinsky/fix-overflow-max-message-bytes… Jan 7, 2019
produce_set_test.go Merge pull request #1141 from adwinsky/fix-overflow-max-message-bytes… Jan 7, 2019
real_decoder.go factor out getStringLength, use putArrayLength Dec 5, 2017
real_encoder.go add create partitions Dec 4, 2017
record.go Add producer support for Kafka 0.11 Records Nov 2, 2017
record_batch.go Reuse compression writer objects Oct 5, 2018
record_test.go Fix gzip compression encode/decode test Feb 13, 2018
records.go Handle overflow-only batch Aug 16, 2018
records_test.go Expose Records union fields Feb 13, 2018
request.go Implement SASL/OAUTHBEARER support Dec 23, 2018
request_test.go Simple validation of required version Feb 14, 2018
response_header.go Cleanup a bunch more error formats Jul 29, 2015
response_header_test.go Fix Golint errors, except for all the missing comments. Aug 30, 2013
sarama.go Expose request latency metric Nov 22, 2016
sasl_authenticate_request.go Clean up error handling Jan 7, 2019
sasl_authenticate_request_test.go Fix SaslAuthenticateRequest Jan 7, 2019
sasl_authenticate_response.go Clean up error handling Jan 7, 2019
sasl_authenticate_response_test.go Increase test coverage Jan 7, 2019
sasl_handshake_request.go Implement SASL/OAUTHBEARER support Dec 23, 2018
sasl_handshake_request_test.go Add support for latest protocol messages Jun 9, 2016
sasl_handshake_response.go Following Golint tips for if blocks who ends with a return Feb 9, 2017
sasl_handshake_response_test.go Add support for decoding versioned responses Jun 9, 2016
sync_group_request.go Expose producer metrics with go-metrics Oct 25, 2016
sync_group_request_test.go Add tests for all new request types. Dec 8, 2015
sync_group_response.go Following Golint tips for if blocks who ends with a return Feb 9, 2017
sync_group_response_test.go Add support for decoding versioned responses Jun 9, 2016
sync_producer.go Do not modify ProducerMessage.MetaData during the whole publishing pr… Jun 2, 2018
sync_producer_test.go Formating all files with gofmt -s Feb 7, 2017
timestamp.go Make timestamp fields of type time.Time and time.Duration Nov 1, 2017
txn_offset_commit_request.go add transaction-related request/responses (22, 24, 25, 26, 28) Jan 25, 2018
txn_offset_commit_request_test.go add transaction-related request/responses (22, 24, 25, 26, 28) Jan 25, 2018
txn_offset_commit_response.go add transaction-related request/responses (22, 24, 25, 26, 28) Jan 25, 2018
txn_offset_commit_response_test.go add transaction-related request/responses (22, 24, 25, 26, 28) Jan 25, 2018
utils.go Add version defs for patch releases Nov 28, 2018
utils_test.go String functions for KafkaVersion (#989) Nov 27, 2017
zstd_cgo.go Fix build without cgo Oct 2, 2018
zstd_fallback.go Fix build without cgo Oct 2, 2018

README.md

sarama

GoDoc Build Status Coverage

Sarama is an MIT-licensed Go client library for Apache Kafka version 0.8 (and later).

Getting started

  • API documentation and examples are available via godoc.
  • 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. This means we currently officially support Go 1.8 through 1.11, and Kafka 1.0 through 2.0, although older releases are still likely to work.

Sarama follows semantic versioning and provides API stability via the gopkg.in service. You can import a version with a guaranteed stable API via http://gopkg.in/Shopify/sarama.v1. A changelog is available here.

Contributing