Get rid of KafkaProcessor, replace with single KafkaSource
Fix the stream conversion: agent.stream() returns a stream of dictionaries instead of the "result" stream (stream of HttpExchange objects) so one needs another transform to transform the dictionaries to HttpExchange objects
[ ] Everything now works locally, but I can't figure out a good way to use agent.test_context() to properly test that the source works as expected. agent.stream() does not yield anything until worker is started, but starting a worker in tests seems like the wrong way to test and probably doesn't even work without running Kafka. We could add "end-to-end" tests that require running Kafka with Docker to pass but I don't think we need those quite yet.
KafkaProcessor
, replace with singleKafkaSource
agent.stream()
returns a stream of dictionaries instead of the "result" stream (stream of HttpExchange objects) so one needs another transform to transform the dictionaries to HttpExchange objectsagent.test_context()
to properly test that the source works as expected.agent.stream()
does not yield anything until worker is started, but starting a worker in tests seems like the wrong way to test and probably doesn't even work without running Kafka. We could add "end-to-end" tests that require running Kafka with Docker to pass but I don't think we need those quite yet.