Skip to content

Commit

Permalink
Update Kafka configuration and version
Browse files Browse the repository at this point in the history
  • Loading branch information
mantzas committed Jan 3, 2024
1 parent 55c82fd commit 19d110f
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 18 deletions.
2 changes: 1 addition & 1 deletion client/kafka/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const (
clientTopic = "clientTopic"
)

var brokers = []string{"127.0.0.1:9093"}
var brokers = []string{"127.0.0.1:9092"}

func TestNewAsyncProducer_Success(t *testing.T) {
saramaCfg, err := DefaultProducerSaramaConfig("test-producer", true)
Expand Down
2 changes: 1 addition & 1 deletion component/kafka/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const (
successTopic2 = "successTopic2"
failAllRetriesTopic2 = "failAllRetriesTopic2"
failAndRetryTopic2 = "failAndRetryTopic2"
broker = "127.0.0.1:9093"
broker = "127.0.0.1:9092"
groupSuffix = "-group"
)

Expand Down
42 changes: 26 additions & 16 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
version: "3.8"
services:
zookeeper:
image: bitnami/zookeeper:latest
ports:
- "2181:2181"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: bitnami/kafka:2
image: bitnami/kafka:3.4
hostname: kafka
ports:
- "9092:9092"
- "9093:9093"
- "9094:9094"
volumes:
- "kafka_data:/bitnami"
environment:
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_ENABLE_KRAFT=yes
- KAFKA_CFG_PROCESS_ROLES=broker,controller
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://:9094
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092,EXTERNAL://kafka:9094
- KAFKA_BROKER_ID=1
- [email protected]:9093
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://:9093
- KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka:9092,EXTERNAL://localhost:9093
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME=CLIENT
depends_on:
- zookeeper
- KAFKA_CFG_NODE_ID=1
# - KAFKA_AUTO_CREATE_TOPICS_ENABLE=true
- BITNAMI_DEBUG=yes
# - KAFKA_CFG_NUM_PARTITIONS=2
rabbitmq:
image: docker.io/bitnami/rabbitmq:latest
hostname: rabbitmq
ports:
- '4369:4369'
- '5551:5551'
Expand All @@ -38,6 +41,7 @@ services:
- 'rabbitmq_data:/bitnami/rabbitmq/mnesia'
mysql:
image: mysql:8
hostname: mysql
restart: always
environment:
MYSQL_DATABASE: "patrondb"
Expand All @@ -53,6 +57,7 @@ services:
- mysql_data:/var/lib/mysql
redis:
image: docker.io/bitnami/redis:6.2
hostname: redis
environment:
- ALLOW_EMPTY_PASSWORD=yes
ports:
Expand All @@ -61,6 +66,7 @@ services:
- "redis_data:/bitnami/redis/data"
localstack:
image: localstack/localstack:latest
hostname: localstack
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # external services port range
Expand All @@ -72,6 +78,7 @@ services:
- "/var/run/docker.sock:/var/run/docker.sock"
hivemq:
image: hivemq/hivemq4:latest
hostname: hivemq
restart: always
ports:
- target: 1883
Expand All @@ -88,6 +95,7 @@ services:
HIVEMQ_CLUSTER_TRANSPORT_TYPE: "TCP"
mongo:
image: mongo:5
hostname: mongo
restart: always
ports:
- "27017:27017"
Expand All @@ -100,4 +108,6 @@ volumes:
mysql_data:
driver: local
redis_data:
driver: local
driver: local
kafka_data:
driver: local

0 comments on commit 19d110f

Please sign in to comment.