Skip to content

Commit

Permalink
fix: Convert list from consumer to dict for message (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
hairmare authored Dec 31, 2024
1 parent ecc8ad9 commit d40d783
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion acringest.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,12 @@ def on_sigint(*_: Any) -> NoReturn: # noqa: ANN401 # pragma: no cover
mc.make_bucket(bucket)

for msg in consumer:
headers: list[tuple[str, bytes]] = msg.headers if msg.headers else []
ce: CloudEvent = from_structured(
message=KafkaMessage(
key=msg.key,
value=msg.value,
headers=msg.headers if msg.headers else {},
headers={h[0]: h[1] for h in headers},
),
)
if (
Expand Down

0 comments on commit d40d783

Please sign in to comment.