-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, we created a new NATS subscription for each ARI subscription, which is inefficient for large numbers of similar subscriptions. (See Issue #26) With this change, we now retain a single NATS subscription for any number of ari subscriptions for which the same NATS subscription is sufficient, regardless of where in the tree of ARI clients it may be. To do this, we create a root-level (core) back-to-back event bus, with the NATS subscription being bound to a stdbus ARI bus. All ari-proxy clients subtend a new SubBus, which forwards all requests on to the core ARI bus, registering them along the way. When the SubBus is closed, the bound subscriptions will be closed, but the root-level bus itself will stay in existence. There is a remaining issue wherein long-running root-level ari-proxy clients will accumulate NATS subscriptions and not have them terminate even after all SubBuses are closed. This will need to be fixed in a later patch, but it should not affect most uses, for now. Fixes #26
- Loading branch information
Showing
3 changed files
with
117 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters