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
async def hello(stream: Stream, emit: Callable):
async for value in stream:
emit("a-topic", value)
2. Import function
from dam import emit
async def hello(stream: Stream):
async for value in stream:
emit("a-topic", value)
Decisions
Goal
Define the interface to produce events
Considerations
Ideas
Names
1. Dependency injection
2. Import function
Decisions