summaryrefslogtreecommitdiff
path: root/main/stasis.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2016-06-03 11:35:49 -0500
committerRichard Mudgett <rmudgett@digium.com>2016-06-09 10:32:07 -0500
commitdcfef53ee2339d09f839aa4e333419b80b309d8a (patch)
tree76193b7e1f9251bdce3aba0c2e57b270794ab797 /main/stasis.c
parent4879cd875c932817c8259934814dd18cf15f5a1c (diff)
stasis: Add setting subscription congestion levels.
Stasis subscriptions and message routers create taskprocessors to process the event messages. API calls are needed to be able to set the congestion levels of these taskprocessors for selected subscriptions and message routers. * Updated CDR, CEL, and manager's stasis subscription congestion levels based upon stress testing. Increased the congestion levels to reduce the potential for bursty call setup/teardown activity from triggering the taskprocessor overload alert. CDRs in particular need an extra high congestion level because they can take awhile to process the stasis messages. ASTERISK-26088 Reported by: Richard Mudgett Change-Id: Id0a716394b4eee746dd158acc63d703902450244
Diffstat (limited to 'main/stasis.c')
-rw-r--r--main/stasis.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/main/stasis.c b/main/stasis.c
index 9fe3a2aae..91ad94e76 100644
--- a/main/stasis.c
+++ b/main/stasis.c
@@ -564,6 +564,18 @@ struct stasis_subscription *stasis_unsubscribe(struct stasis_subscription *sub)
return NULL;
}
+int stasis_subscription_set_congestion_limits(struct stasis_subscription *subscription,
+ long low_water, long high_water)
+{
+ int res = -1;
+
+ if (subscription) {
+ res = ast_taskprocessor_alert_set_levels(subscription->mailbox,
+ low_water, high_water);
+ }
+ return res;
+}
+
void stasis_subscription_join(struct stasis_subscription *subscription)
{
if (subscription) {