docker / go-events

Composable event distribution for Go
Apache License 2.0
131 stars 22 forks source link

Close on Queue cannot close downstream #23

Open stevvooe opened 7 years ago

stevvooe commented 7 years ago

If you have a Queue writing to a Channel and call close on the Queue, Queue.Close will block on writing to Channel.Write. This is because the Close waits on the shutdown condition of the Queue.

Please see https://github.com/containerd/containerd/pull/1254 for the mitigation for this.

Adirio commented 6 years ago

Should queues be able to drop the held messages when stopped if configured to do so? I mean, use an additional parameter that instructs the queues to drop their messages either instantly or after some time when they are closed so that the next sink in the pipeline can be closed in a "time-deterministic" fashion.