Rabbitmq transport polling
blankley opened this issue · 2 comments
blankley commented
We're using rabbitmq as a transport and seeing very high cpu usage. We can see over 12k Gets a second and it looks like we're polling rabbit with no timeout :
I added a:
await new Promise(r => setTimeout(r,1000))
to
and see the expected 1 Get a second and normal CPU usage:
Are we making a mistake in implementation? Missing something else?
adenhertog commented
thanks for finding that @blankley . I've pushed a change that internally uses callbacks rather than loops that should be much easier on your CPU.
This fix is available in the latest @node-ts/bus-core
and @node-ts/bus-rabbitmq
blankley commented
Thanks! Great fix. Not to sound ungrateful, but would it be possible to back port this to the 0.6.x tree?