Skip to content
Sarama is a Go library for Apache Kafka 0.8, and up.
Go Other
  1. Go 99.3%
  2. Other 0.7%
Branch: master
Clone or download
bai Merge pull request #1538 from slaunay/feature/producer-perf-tls
Support TLS protocol in kafka-producer-performance
Latest commit bb74e49 Nov 14, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github improves template formatting Aug 22, 2019
examples Update documentation with Sarama instead of Sarma Sep 30, 2019
mocks fix incorrect SetTopicMetadata name mentions (introduced in 2052bd9) Nov 5, 2019
tools Support TLS protocol in kafka-producer-performance Nov 13, 2019
vagrant chmod +x producer.sh Mar 30, 2019
.gitignore Addressing feeback Jul 12, 2018
.travis.yml Add support for Go 1.13 Sep 4, 2019
CHANGELOG.md Compile changelog for 1.24.1 [ci skip] Oct 31, 2019
LICENSE Technically Shopify owns the repo Apr 2, 2018
Makefile this is not valid anymore with go mod Aug 22, 2019
README.md Add support for Go 1.13 Sep 4, 2019
Vagrantfile Use sensible heap size for JVMs in Vagrant Oct 25, 2016
acl_bindings.go Refactor misspelled word Resouce to Resource May 15, 2019
acl_create_request.go another pull request to please lint gods Apr 8, 2019
acl_create_request_test.go Refactor misspelled word Resouce to Resource May 15, 2019
acl_create_response.go another pull request to please lint gods Apr 8, 2019
acl_create_response_test.go add Describe/Create/DeleteAcls Dec 21, 2017
acl_delete_request.go another pull request to please lint gods Apr 8, 2019
acl_delete_request_test.go Implements v1 of {Create,Describe,Delete}AclRequest Feb 19, 2019
acl_delete_response.go another pull request to please lint gods Apr 8, 2019
acl_delete_response_test.go add Describe/Create/DeleteAcls Dec 21, 2017
acl_describe_request.go another pull request to please lint gods Apr 8, 2019
acl_describe_request_test.go Implements v1 of {Create,Describe,Delete}AclRequest Feb 19, 2019
acl_describe_response.go another pull request to please lint gods Apr 8, 2019
acl_describe_response_test.go add Describe/Create/DeleteAcls Dec 21, 2017
acl_filter.go Implements v1 of {Create,Describe,Delete}AclRequest Feb 19, 2019
acl_types.go using iota for constants and some style fixes Mar 13, 2019
add_offsets_to_txn_request.go another pull request to please lint gods Apr 8, 2019
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 another pull request to please lint gods Apr 8, 2019
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 another pull request to please lint gods Apr 8, 2019
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 another pull request to please lint gods Apr 8, 2019
add_partitions_to_txn_response_test.go add transaction-related request/responses (22, 24, 25, 26, 28) Jan 25, 2018
admin.go fixed ClusterAdmin DescribeCluster api return controllerID invalid #1511 Oct 24, 2019
admin_test.go fix bug deleteRecord (#1425) Jul 20, 2019
alter_configs_request.go another pull request to please lint gods Apr 8, 2019
alter_configs_request_test.go Fix flaky TestAlterConfigsRequest Feb 13, 2018
alter_configs_response.go another pull request to please lint gods Apr 8, 2019
alter_configs_response_test.go Add Describe + AlterConfigs (#1014) Feb 3, 2018
api_versions_request.go another pull request to please lint gods Apr 8, 2019
api_versions_request_test.go Add support for latest protocol messages Jun 9, 2016
api_versions_response.go another pull request to please lint gods Apr 8, 2019
api_versions_response_test.go Add support for decoding versioned responses Jun 9, 2016
async_producer.go fix brokerProducer goroutine leak (#1442) Aug 8, 2019
async_producer_test.go fix brokerProducer goroutine leak (#1442) Aug 8, 2019
balance_strategy.go Change type of unvisitedPartitions from []string to bool to economize Aug 14, 2019
balance_strategy_test.go make fmt with v.1.13 Sep 6, 2019
broker.go fix: ensure consistent use of read/write deadlines Oct 30, 2019
broker_test.go fix: ensure consistent use of read/write deadlines Oct 30, 2019
client.go Merge pull request #1531 from roblaszczak/master Nov 12, 2019
client_test.go Support timeout when fetching metadata Apr 23, 2019
client_tls_test.go make fmt with v.1.13 Sep 6, 2019
compress.go Remove cgo zstd package Sep 3, 2019
config.go comment typo: ChanneBufferSize -> ChannelBufferSize Oct 26, 2019
config_resource_type.go another pull request to please lint gods Apr 8, 2019
config_test.go Add kerberos support May 12, 2019
consumer.go fetch size overflow (#1376) Jul 2, 2019
consumer_group.go added comments for handleError Nov 12, 2019
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 Revert "Synced error names and descriptions with the kafka's protocol" Jan 23, 2019
consumer_test.go bug: handle and log throttled FetchResponses May 29, 2019
control_record.go another pull request to please lint gods Apr 8, 2019
control_record_test.go midway on consumer test Mar 12, 2019
crc32_field.go Reuse lengthFields May 30, 2019
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 Satisfy the error interface in create responses Feb 11, 2019
create_partitions_response_test.go Satisfy the error interface in create responses Feb 11, 2019
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 Satisfy the error interface in create responses Feb 11, 2019
create_topics_response_test.go Satisfy the error interface in create responses Feb 11, 2019
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 Set correct Kafka version for DescribeConfigsRequest v1 Feb 8, 2019
describe_configs_request_test.go Implement DescribeConfigsRequest v1 & v2 Dec 3, 2018
describe_configs_response.go using iota for constants and some style fixes Mar 13, 2019
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
describe_log_dirs_request.go Fix request decode Oct 26, 2019
describe_log_dirs_request_test.go Fix comment Oct 26, 2019
describe_log_dirs_response.go Use KError for ErrorCodes Oct 26, 2019
describe_log_dirs_response_test.go Add test for DescribeLogDirsResponse Oct 26, 2019
dev.yml Compile changelog for v1.24.0 Oct 9, 2019
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 Handle a few missed protocol errors and add the new one Aug 20, 2019
fetch_request.go using iota for constants and some style fixes Mar 13, 2019
fetch_request_test.go Add support for Kafka 0.11 in consumer Oct 31, 2017
fetch_response.go PR fixes: Mar 30, 2019
fetch_response_test.go fetch size overflow (#1376) Jul 2, 2019
find_coordinator_request.go using iota for constants and some style fixes Mar 13, 2019
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 Revert "Synced error names and descriptions with the kafka's protocol" Jan 23, 2019
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 functional test: Mar 30, 2019
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
go.mod Merge branch 'master' into use-pure-go-zstd Sep 5, 2019
go.sum Use zero frames for encoding. Sep 5, 2019
gssapi_kerberos.go removes gofork direct usage as fix is part of go Aug 21, 2019
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
kerberos_client.go Add kerberos support May 12, 2019
kerberos_client_test.go Add kerberos support May 12, 2019
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 Revert "Synced error names and descriptions with the kafka's protocol" Jan 23, 2019
length_field.go Reuse lengthFields May 30, 2019
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 lengthFields May 30, 2019
message_set.go Reuse lengthFields May 30, 2019
message_test.go Revert "Add workaround for an empty zstd message" Oct 2, 2018
metadata_request.go bug: V5 MetadataRequest nullable topics array Apr 10, 2019
metadata_request_test.go bug: V5 MetadataRequest nullable topics array Apr 10, 2019
metadata_response.go added offline replicas operation to client for kafka version >= 1.x Mar 17, 2019
metadata_response_test.go Revert "Synced error names and descriptions with the kafka's protocol" Jan 23, 2019
metrics.go Unregister all broker metrics on broker stop Dec 7, 2018
metrics_test.go Expose producer metrics with go-metrics Oct 25, 2016
mockbroker.go Add kerberos support May 12, 2019
mockkerberos.go Add kerberos support May 12, 2019
mockresponses.go Merge pull request #1485 from agapoff/improved-mock-delete-acl-response Sep 7, 2019
offset_commit_request.go Address a few staticcheck suggestions Apr 1, 2019
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 Address a few staticcheck suggestions Apr 1, 2019
offset_manager_test.go added offline replicas operation to client for kafka version >= 1.x Mar 17, 2019
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 Provide peekInt8 to reduce allocations May 13, 2019
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 Revert "Synced error names and descriptions with the kafka's protocol" Jan 23, 2019
produce_set.go Address a few staticcheck suggestions Apr 1, 2019
produce_set_test.go Merge pull request #1141 from adwinsky/fix-overflow-max-message-bytes… Jan 7, 2019
real_decoder.go Remove use of magic number May 14, 2019
real_encoder.go add create partitions Dec 4, 2017
record.go control record + isTransactional bit parsing Mar 10, 2019
record_batch.go Reuse lengthFields May 30, 2019
record_test.go Fix gzip compression encode/decode test Feb 13, 2018
records.go Provide peekInt8 to reduce allocations May 13, 2019
records_test.go ut transactional flag Mar 17, 2019
request.go Add test for DescribeLogDirsRequest Oct 26, 2019
request_test.go Simple validation of required version Feb 14, 2018
response_header.go Add SASL SCRAM-SHA-512 and SCRAM-SHA-256 mechanismes Feb 27, 2019
response_header_test.go Fix Golint errors, except for all the missing comments. Aug 30, 2013
sarama.go using iota for constants and some style fixes Mar 13, 2019
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
sticky_assignor_user_data.go Add sticky partition assignor Jul 1, 2019
sticky_assignor_user_data_test.go Add sticky partition assignor Jul 1, 2019
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 added offline replicas operation to client for kafka version >= 1.x Mar 17, 2019
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 2.3.0 Jul 2, 2019
utils_test.go String functions for KafkaVersion (#989) Nov 27, 2017
zstd.go Remove double newline Sep 6, 2019

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.11 through 1.13, and Kafka 2.1 through 2.3, 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

You can’t perform that action at this time.