astronomy-commons / adc-streaming

Core Python(ic) client libraries and utilities for alert streaming
BSD 3-Clause "New" or "Revised" License
6 stars 6 forks source link

Processing avro-formatted streams appears broken #29

Closed ebellm closed 4 years ago

ebellm commented 4 years ago
import adc.streaming as adcs

with adcs.open("kafka://{ZTF_BROKER}/{ZTF_TOPIC}, start_at="earliest") as stream:
    for idx, msg in stream:
        print(f"id: {idx}, contents: {msg}")

fails with

----> 2     for idx, msg in stream:
      3         print(f"id: {idx}, contents: {msg}")
      4
fastavro/_read.pyx in _iter_avro_records()
fastavro/_read.pyx in fastavro._read.skip_sync()
ValueError: I/O operation on closed file.
spenczar commented 4 years ago

Thanks, I'm able to replicate this. I'm digging in.