Closed baranga closed 8 years ago
@mateodelnorte I have no clue to how to fix this. Maybe something in amqplib broken?
Ok, possibly I identified the issue:
bus/rabbitmq/pubsubqueue.js#L121
Each successful subscribe call overwrites subscription.consumerTag
. So after second subscribe call PubSubQueue forgot about first subscribe.
Made subscription data local to subscribe call so it now allows multiple subscribes.
fantastic. looks great.
published to servicebus@2.0.5
This PR does not fix the issue but introduces tests to prove the issue.
The issue: multiple subscriptions on a persistent queue get created and destroyed via unsubscribe calls afterwards. It is expected that after successful unsubscribing no more events are received. Right now the callback provided to subscribe still gets called after unsubscribtion.