Skip to content

Return multiple errors from Writer.WriteMessages and MessageTooLargeError handling improvements #401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
62bb464
Export WriterError struct type and associated fields.
Evanjt1 Oct 17, 2019
046b6b6
Relocate WriterError so it is grouped with other exported types in wr…
Evanjt1 Oct 17, 2019
46fffc3
Fix bug in writer.write where messages were being sent to the incorre…
Evanjt1 Oct 23, 2019
adc009d
Add id field to writerMessage struct type.
Evanjt1 Oct 23, 2019
7aa5503
Set id when creating writerMessages struct in writer.WriteMessages.
Evanjt1 Oct 24, 2019
426ab01
Add writerResponse struct type to wrap write errors with message id.
Evanjt1 Oct 24, 2019
d6aaf60
Return writerResponse in fakeWriter.messages() in writer_test.
Evanjt1 Oct 28, 2019
0891d29
Add test for kafka 2.2.1 compatibility to circle ci config.
Evanjt1 Nov 6, 2019
0bd6dc0
Remove unused WriterError.Cause method
Evanjt1 Feb 5, 2020
4963dac
Add WriterErrors type to wrap a slice of WriterError
Evanjt1 Feb 5, 2020
67b360e
Change err type in writerResponse to *WriterError
Evanjt1 Feb 11, 2020
d5ef30b
Return multiple errors from Writer.WriteMessages and try entire batch…
Evanjt1 Feb 11, 2020
427f1ed
Rename receiver in WriterErrors.Error method
Evanjt1 Feb 11, 2020
4a268bb
Add writerTestCase type which provides common methods for Writer tests
Evanjt1 Feb 11, 2020
407ea25
Update tests for Writer type
Evanjt1 Feb 11, 2020
9e8274a
Fix race condition by making testRetryWriter type thread safe
Evanjt1 Feb 11, 2020
0876ebf
Add Unwrap method to WriterError type.
Evanjt1 Feb 24, 2020
187a291
Merge remote-tracking branch 'upstream/master' into writer-return-errors
Evanjt1 Feb 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,37 @@ jobs:
- run: go get -v -t . ./gzip ./lz4 ./sasl ./snappy
- run: go test -v -race -cover -timeout 150s $(go list ./... | grep -v examples)

kafka-221:
working_directory: /go/src/github.com/segmentio/kafka-go
environment:
KAFKA_VERSION: "2.2.1"
docker:
- image: circleci/golang
- image: wurstmeister/zookeeper
ports: ['2181:2181']
- image: wurstmeister/kafka:2.12-2.2.1
ports: ['9092:9092','9093:9093']
environment:
KAFKA_BROKER_ID: '1'
KAFKA_CREATE_TOPICS: 'test-writer-0:3:1,test-writer-1:3:1'
KAFKA_DELETE_TOPIC_ENABLE: 'true'
KAFKA_ADVERTISED_HOST_NAME: 'localhost'
KAFKA_ADVERTISED_PORT: '9092'
KAFKA_ZOOKEEPER_CONNECT: 'localhost:2181'
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
KAFKA_LISTENERS: 'PLAINTEXT://:9092,SASL_PLAINTEXT://:9093'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://localhost:9092,SASL_PLAINTEXT://localhost:9093'
KAFKA_SASL_ENABLED_MECHANISMS: SCRAM-SHA-256,SCRAM-SHA-512,PLAIN
KAFKA_OPTS: "-Djava.security.auth.login.config=/opt/kafka/config/kafka_server_jaas.conf"
CUSTOM_INIT_SCRIPT: |-
echo -e 'KafkaServer {\norg.apache.kafka.common.security.scram.ScramLoginModule required\n username="adminscram"\n password="admin-secret";\n org.apache.kafka.common.security.plain.PlainLoginModule required\n username="adminplain"\n password="admin-secret"\n user_adminplain="admin-secret";\n };' > /opt/kafka/config/kafka_server_jaas.conf;
/opt/kafka/bin/kafka-configs.sh --zookeeper localhost:2181 --alter --add-config 'SCRAM-SHA-256=[password=admin-secret-256],SCRAM-SHA-512=[password=admin-secret-512]' --entity-type users --entity-name adminscram
steps:
- checkout
- setup_remote_docker: { reusable: true, docker_layer_caching: true }
- run: go get -v -t . ./gzip ./lz4 ./sasl ./snappy
- run: go test -v -race -cover -timeout 150s $(go list ./... | grep -v examples)

workflows:
version: 2
run:
Expand All @@ -131,3 +162,4 @@ workflows:
- kafka-011
- kafka-111
- kafka-210
- kafka-221
Loading