iggy-rs / iggy-python-client

Official Python client SDK for Iggy.rs message streaming.
https://pypi.org/project/iggy-py/
MIT License
18 stars 7 forks source link

SendMessage spoils payload #13

Closed pikhovkin closed 5 months ago

pikhovkin commented 5 months ago

I followed the following steps:

  1. docker run --rm -p 8080:8080 -p 3000:3000 -p 8090:8090 iggyrs/iggy:0.2.23 or docker run --rm -p 8080:8080 -p 3000:3000 -p 8090:8090 iggyrs/iggy:0.2.24
  2. pip install maturin
  3. maturin develop
  4. change python_examples/producer.py
    ...
    -payload = f"message-{current_id}"
    +payload = f"message-{current_id}" * 5
    ...
  5. python producer.py
  6. python consumer.py

Result

Messages will be consumed from stream: 1, topic: 1, partition: 1 with interval 500.0 ms.
Handling message at offset: 0, payload: 0|message-1message-1me...-1message-1message-1...
Handling message at offset: 1, payload: 0|message-2message-2me...-2message-2message-2...
Handling message at offset: 2, payload: 0|message-3message-3me...-3message-3message-3...
Handling message at offset: 3, payload: 0|message-4message-4me...-4message-4message-4...
Handling message at offset: 4, payload: 0|message-5message-5me...-5message-5message-5...
Handling message at offset: 5, payload: 0|message-6message-6me...-6message-6message-6...
Handling message at offset: 6, payload: 0|message-7message-7me...-7message-7message-7...
Handling message at offset: 7, payload: 0|message-8message-8me...-8message-8message-8...
Handling message at offset: 8, payload: 0|message-9message-9me...-9message-9message-9...
Handling message at offset: 9, payload: 0|message-10message-10...message-10message-10...

Those payloads have 0| prefix and they have ... inside.

hubcio commented 5 months ago

I will take a look during this week.