Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
chore: merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn Sarwar committed Sep 6, 2019
2 parents b75b9eb + 413e0c4 commit 6bc038a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions aether-producer/producer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,10 +496,12 @@ def create_topic(self):
self.logger.debug(f'Trying to create topic {self.topic_name}')
kadmin = self.context.kafka_admin_client
topic_config = self.context.settings.get('kafka_settings', {}).get('default.topic.config')
partitions = int(self.context.settings.get('kafka_default_topic_partitions', 1))
replicas = int(self.context.settings.get('kafka_default_topic_replicas', 1))
topic = NewTopic(
self.topic_name,
num_partitions=1,
replication_factor=1,
num_partitions=partitions,
replication_factor=replicas,
config=topic_config
)
fs = kadmin.create_topics([topic])
Expand Down
2 changes: 2 additions & 0 deletions aether-producer/producer/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"kernel_admin_password": "",
"kafka_failure_wait_time": 10,
"kafka_url": "kafka:29092",
"kafka_default_topic_partitions": 1,
"kafka_default_topic_replicas": 3,
"kafka_settings": {
"default.topic.config": {
"retention.ms": -1
Expand Down
2 changes: 2 additions & 0 deletions aether-producer/tests/conf/producer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"kernel_admin_password": "",
"kafka_failure_wait_time": 4,
"kafka_url": "kafka-test:29092",
"kafka_default_topic_partitions": 1,
"kafka_default_topic_replicas": 1,
"kafka_settings": {
"default.topic.config": {
"retention.ms": -1
Expand Down

0 comments on commit 6bc038a

Please sign in to comment.