Skip to content

Produce event interface #1

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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