-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Milestone
Description
When we create a class implements the IDistributedEventHandler<T> (see), ABP automatically subscribes to the event. When you use the RabbitMQ provider, it subscribes to the event on the rubbitmq as durable.
That's fine and what we want. However, assume that we've decided to remove this handler. How to unsubscribe from the event? We need to discuss this.
Possible ideas (without thinking much):
- ABP gets a list of already subscribed events, checks with the current handlers, find the diff and removes old subscriptions. But this require some rabbitmq integration and I don't know if rabbitmq API allows it. Should check.
- Developer manually maintains a list of events to unsubscribe. ABP checks this list on app startup and unsubscribes from rabbitmq. This reduces startup time a little, but this is not important. Essential problem is: a) we need to manually manage it, b) when we decide to clean this list? When we sure that all unsubscribed? How to automate?
cld0815