Skip to content

Produce event interface #1

@woile

Description

@woile

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

  • keyword: send
  • interface: TBD

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions