Skip to content

Commit

Permalink
feat(HBI): Use retries and timeout from args in KafkaProducer (#120)
Browse files Browse the repository at this point in the history
* fix(skip_to_end): Supply server port as well

* refactor(post_kafka): Unify Kafka_host assignment to before common_params

* fix(get_kafka): Omit list bracets in non-pointer supplying to Kafka

* feat(skelet): Add INFO output option

* lint(skip_to_end)

* fix(post_kafka): Give back kafka_ prefix

* feat(skelet setup): Rename --info to --verbose to be unified with others

* fix(skip_end): Omit explicit logging level logic, use what's in skelet already

* feat(HBI): Use retries and timeout from args in KafkaProducer
  • Loading branch information
Smejky338 authored Feb 14, 2024
1 parent 687a190 commit 379c650
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions opl/hbi_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,16 @@ def gen_send_verify(args, status_data):
sasl_mechanism="SCRAM-SHA-512",
sasl_plain_username=args.kafka_username,
sasl_plain_password=args.kafka_password,
request_timeout_ms=args.kafka_request_timeout_ms,
retries=args.kafka_retries,
)
else:
logging.info(f"Creating passwordless producer to {args.kafka_host}")
producer = kafka.KafkaProducer(
bootstrap_servers=kafka_host,
api_version=(0, 10),
request_timeout_ms=args.kafka_request_timeout_ms,
retries=args.kafka_retries,
)

status_data.set("parameters.kafka.bootstrap", kafka_host)
Expand Down

0 comments on commit 379c650

Please sign in to comment.