Skip to content

Memory leak warning when using a predefined instance of rsmq #15

@kpturner

Description

@kpturner

If I create an instance of rsmq and create 11 or more queues on that instance - if I then create 11 or more rsmq-workers and specify the rsmq instance in the options (so that it does not create its own) then it starts throwing warnings:

warning: possible EventEmitter memory leak detected. 11 disconnect listeners added. Use emitter.setMaxListeners() to increase limit.

This is because each time I create the new rsmq-worker it adds a disconnect listener to the original rsmq instance. As soon as you add 11 or more EventEmitter goes into meltdown :(

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions