stoewer / go-nakadi

A nakadi client for Go
MIT License
13 stars 15 forks source link

Processor is unable to stop stream immediately #42

Open krnkl opened 6 years ago

krnkl commented 6 years ago

When Processor start stream it blocks on call to stream.NextEvents here until any event arrives. This method doesn’t return on keep-alive messages.

When Processor.Stop() is called it cancels Processor.ctx and waits for a all started streams to be finished. However, there is no way this cancellation triggers anything inside single stream. Thus, until any real event arrives on nakadi - stream will block.

As implications: • processor cannot stop all streams immediately • processor cannot stop stream until other event than keep-alive is sent

buzzlighty commented 4 years ago

@krnkl Were you able to find a workaround to stop it gracefully?