Sarama is a Go library for Apache Kafka 0.8, and up.
Go Other
Clone or download
eapache Merge pull request #1142 from andy2046/add_Timeout_for_ClusterAdmin
add Timeout config for ClusterAdmin related Requests
Latest commit e7238b1 Jul 30, 2018
Permalink
Failed to load latest commit information.
.github Update ISSUE_TEMPLATE.md Oct 17, 2016
examples Fix tiny typo in examples README link Mar 12, 2017
mocks Increase test coverage of SyncProducer Feb 6, 2018
tools Fix config for calling NewSyncProducer() Dec 15, 2016
vagrant Make vagrant up work again Dec 21, 2017
.gitignore Addressing feeback Jul 12, 2018
.travis.yml Test against kafka 0.11.0.2 Apr 2, 2018
CHANGELOG.md Better changelog item grouping May 30, 2018
LICENSE Technically Shopify owns the repo Apr 2, 2018
Makefile Ignore fmt package when doing errcheck May 30, 2018
README.md Test against kafka 0.11.0.2 Apr 2, 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 Add version check for headers Jun 15, 2018
async_producer_test.go Add timeout to async_producer_test Feb 13, 2018
broker.go Add LocalAddr to Config struct and honor in broker.Open(). Jul 3, 2018
broker_test.go Make kafka-version configurable May 4, 2018
client.go Merge pull request #1125 from andyxning/fix_topic_metadata_on-demand_… Jul 12, 2018
client_test.go Fix test Jul 3, 2018
client_tls_test.go Add NewMockBrokerListener() so that it's possible to test TLS connect… Jan 9, 2018
config.go feat: add Timeout for ClusterAdmin Jul 29, 2018
config_resource_type.go Add Describe + AlterConfigs (#1014) Feb 3, 2018
config_test.go feat: add Timeout for ClusterAdmin Jul 29, 2018
consumer.go Fix block on control messages Jun 14, 2018
consumer_group_members.go More feedback, renamed structs Dec 23, 2015
consumer_group_members_test.go Formating all files with gofmt -s Feb 7, 2017
consumer_metadata_request.go refactor ConsumerMetadataRequest/Response to FindCoordinatorRequest/R… Dec 20, 2017
consumer_metadata_request_test.go refactor ConsumerMetadataRequest/Response to FindCoordinatorRequest/R… Dec 20, 2017
consumer_metadata_response.go remove deprecated fields Jan 25, 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
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 Add Describe + AlterConfigs (#1014) Feb 3, 2018
describe_configs_request_test.go Add Describe + AlterConfigs (#1014) Feb 3, 2018
describe_configs_response.go Add Describe + AlterConfigs (#1014) Feb 3, 2018
describe_configs_response_test.go Add Describe + AlterConfigs (#1014) Feb 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 [bot] remove unused 'packages' dev.yml element [skip ci] Dec 4, 2017
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 fix typo in ErrControllerNotAvailable string Apr 18, 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 Expose Records union fields Feb 13, 2018
fetch_response_test.go Expose Records union fields Feb 13, 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_test.go Increase test timeout Feb 13, 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 Add dynamicPushDecoder interface Oct 31, 2017
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 Add missing Kafka versions Feb 13, 2018
message_set.go Do not choke on MessageSet without version Feb 1, 2018
message_test.go Drop testing empty gzip encoding with the pre-1.8 encoder Mar 9, 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 Added support for Metadata Request/Response up to v5 Mar 20, 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 support of admin operations in sarama Jun 15, 2018
offset_commit_request.go Add method to inspect OffsetCommitRequest offsets Feb 13, 2018
offset_commit_request_test.go Add decode method to request types Jul 13, 2015
offset_commit_response.go Add missing Kafka versions Feb 13, 2018
offset_commit_response_test.go Add mock responses for OffsetManager testing Aug 10, 2015
offset_fetch_request.go Add missing Kafka versions Feb 13, 2018
offset_fetch_request_test.go Add decode method to request types Jul 13, 2015
offset_fetch_response.go Add missing Kafka versions Feb 13, 2018
offset_fetch_response_test.go Add mock responses for OffsetManager testing Aug 10, 2015
offset_manager.go Add custom offset commit retry config Jul 16, 2018
offset_manager_test.go Fix test race Jul 20, 2018
offset_request.go Add missing Kafka versions Feb 13, 2018
offset_request_test.go Support ListOffsetRequest v1 [KIP-79] Oct 31, 2016
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 Add missing Kafka versions Feb 13, 2018
produce_response_test.go Support ProduceResponse v1 and v2 encoding Oct 19, 2017
produce_set.go Document recordbatch offset changes Feb 15, 2018
produce_set_test.go Expose Records union fields Feb 13, 2018
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 Add support for compression levels, closes #1042 Feb 12, 2018
record_test.go Fix gzip compression encode/decode test Feb 13, 2018
records.go Expose Records union fields Feb 13, 2018
records_test.go Expose Records union fields Feb 13, 2018
request.go Add support for DeleteGroups May 3, 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_handshake_request.go Fix race in broker version check Jun 17, 2016
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 support for Kafka 1.1.0 Apr 1, 2018
utils_test.go String functions for KafkaVersion (#989) Nov 27, 2017

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.10, and Kafka 0.11 through 1.1, 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