Goal
Define the interface to produce events
Considerations
- should it be possible to emit to a different broker (let's say we consume from kafka but we want to emit to a redis stream, what then?)
Ideas
Names
emit
produce
send
publish
1. Dependency injection
asyncdefhello(stream: Stream, emit: Callable):
asyncforvalueinstream:
emit("a-topic", value)2. Import function
fromdamimportemitasyncdefhello(stream: Stream):
asyncforvalueinstream:
emit("a-topic", value)Decisions
Goal
Define the interface to produce events
Considerations
Ideas
Names
1. Dependency injection
2. Import function
Decisions