dropbox / amqp-coffee

An AMQP 0.9.1 client for Node.js.
MIT License
79 stars 30 forks source link

Design question #45

Closed janajri closed 9 years ago

janajri commented 9 years ago

@barshow what was the design decision behind the 2 second channel inactivity timeout?

barshow commented 9 years ago

This is a great question. It should be configurable for sure and ill make sure to do that. Our use case is very bursty as far as queue setup, bindings etc, so the 2 seconds works pretty well for us. However I think keeping that channel open either all the time or with a longer timeout could also make sense for other use cases. What would your preference be?

janajri commented 9 years ago

@barshow making this configurable would be a great feature. Longer timeouts would make more sense for our use case as we usually see < 1 msg per second per channel when consuming so timeouts occur quite frequently.

barshow commented 9 years ago

so @janajri to be clear that 2 second timeout is only for channel setup operations, things like declaring queues setting up bindings etc. Consuming or publishing channels will stay open until you close them. But I still will add that configuration.

janajri commented 9 years ago

@barshow, I understand. Thanks for that clarification. Although this is also very useful as we are using this client to connect across data centers (Singapore to US-East)...and just noticed you're already on top of this. Thanks for the quick turnaround! Keep up the great work.

barshow commented 9 years ago

https://github.com/dropbox/amqp-coffee/pull/46 introduces the configuration its published to npm as amqp-coffee@0.1.25-rc1 let me know if that works for you

janajri commented 9 years ago

good stuff, I'll try to get this into production as soon as possible. Let's close this out for now.