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 :)
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:
However, the actual code enforces a Pull-based model. The workflow engine actively "pulls" events on a receive method:
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 :)