无法处理来自 Kafka 的窗口化会话 - 在流式撤销时出现"输出表中缺少键"错误
作者: deuscapturus创建于 2026年5月14日更新于 2026年5月18日
#!/usr/bin/env python3 """ Produce test messages to trigger session window crash. Sends 3 rapid messages that should merge into one session window. This triggers a retraction in Pathway's Rust engine that causes the crash. """
import json import time from confluent_kafka import Producer
def main(): producer = Producer({"bootstrap.servers": "localhost:9092"}) topic = "test.poc.sessions" key = b"test-key-1"
print(f"Sending 3 messages to {topic}...")
# Send 3 rapid messages (100ms apart)
for i in range(3):
msg = json.dumps({"test": f"msg-{i+1}", "timestamp": time.time()})
producer.produce(topic, key=key, value=msg.encode())
print(f" {i+1}. {msg}")
time.sleep(0.1)
producer.flush()
print("\n✓ Messages sent. Run poc_sessions.py to trigger crash.")
if name == "main": main()
内容来源: pathwaycom/pathway