Change Stream: Timeout Connection Or Open indefinitely?


When I am opening a connection for a change stream do I really have to set a timeout for it?
why do the latest tutorials suggest setting a timeout as some kind of best practice?

see: function closeChangeStream(timeInMs = 60000, changeStream)

Hi @Shay_I ,

Having a no timeout operations in programming is generally a bad habit. You need to secure your code with good resume operations and code to cover failure. Therefore indefent operations are not advised.