Skip to content

Commit

Permalink
.github, txn docs: use Kafka 3.6, avoid KAFKA-15653, doc deprecated o…
Browse files Browse the repository at this point in the history
…ption
  • Loading branch information
twmb committed Oct 23, 2023
1 parent 88b2a86 commit a050899
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
needs: golangci
runs-on: ubuntu-latest
name: "integration test kafka"
container: golang:1.20.3
container: golang:1.21.3
services:
kafka:
image: bitnami/kafka:3.5
image: bitnami/kafka:latest
ports:
- 9092:9092
env:
Expand All @@ -47,6 +47,7 @@ jobs:
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: [email protected]:9093
KAFKA_CFG_TRANSACTION_PARTITION_VERIFICATION_ENABLE: false
# Set this to "PLAINTEXT://127.0.0.1:9092" if you want to run this container on localhost via Docker
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_CFG_NODE_ID: 1
Expand All @@ -58,7 +59,6 @@ jobs:
env:
KGO_TEST_RF: 1
KGO_SEEDS: kafka:9092
KGO_TEST_UNSAFE: true
KGO_TEST_STABLE_FETCH: true

integration-test-redpanda:
Expand Down
8 changes: 8 additions & 0 deletions pkg/kgo/txn.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,14 @@ const (
// This relies on Kafka internals. Some brokers (notably Redpanda) are
// more strict with enforcing transaction correctness and this option
// cannot be used and will cause errors.
//
// Deprecated: Kafka 3.6 removed support for the hacky behavior that
// this option was abusing. Thus, as of Kafka 3.6, this option does not
// work against Kafka. This option also has never worked for Redpanda
// becuse Redpanda always strictly validated that partitions were a
// part of a transaction. Later versions of Kafka and Redpanda will
// remove the need for AddPartitionsToTxn at all and thus this option
// ultimately will be unnecessary anyway.
EndBeginTxnUnsafe
)

Expand Down

0 comments on commit a050899

Please sign in to comment.