Skip to content

EventStreamer: Mismatch between documentation (Push) and implementation (Pull) #168

@Kamysek

Description

@Kamysek

Hello :)

I am currently implementing a custom EventStreamer using Encore PubSub, and I've run into a significant architectural discrepancy between the documentation and the actual Go interface.

The documentation describes a Push-based model. The consumer registers a callback function, allowing the streamer to "push" events as they arrive:

func (c *Consumer) Consume(ctx context.Context, fn func(*Event, Ack) error) error

However, the actual code enforces a Pull-based model. The workflow engine actively "pulls" events on a receive method:

func (r *EventReceiver) Recv(ctx context.Context) (*Event, Ack, error)

The Encore PubSub is natively Push-based. If the interface changes to the Push-based model the integration would be very trivial where I simply have to map incoming events to the workflow callback.

With the current interface things are a bit more complicated.

Is the library transitioning to the Push model described in the documentation? If so, is there a specific branch or tag I should target?

Greetings :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions