ayeo-flex-org / pulsar-flex

Pulsar Flex is a modern Apache Pulsar client for Node.js, developed to be independent of C++.
MIT License
45 stars 9 forks source link

Fix Consumer Memory Leak: Hanging promises #80

Closed ronfarkash closed 2 years ago

ronfarkash commented 2 years ago

Fixes #79

await process() will never be resolved due to the function calling itself again and again causing unused references to dequeued messages to stay alive, resulting in a memory leak.

Made process() call asynchronous and added return when the function ends.