stasis: Improve topic/subscription names and statistics.

Topic names now follow: <subsystem>:<functionality>[/<object>]

This ensures that they are all unique, and also provides better
insight in to what each topic is for.

Subscriber ids now also use the main topic name they are
subscribed to and an incrementing integer as their identifier to
make it easier to understand what the subscription is primarily
responsible for.

Both the CLI commands for listing topic and subscription statistics
now sort to make it a bit easier to see what is going on.

Subscriptions will now show all topics that they are receiving messages
from, not just the main topic they were subscribed to.

ASTERISK-28335

Change-Id: I484e971a38c3640f2bd156282e532eed84bf220d
This commit is contained in:
Joshua Colp
2019-03-07 08:28:31 -04:00
parent 5f6890a8f9
commit 0231dd6ae7
23 changed files with 213 additions and 63 deletions

View File

@@ -3337,7 +3337,7 @@ int ast_delete_mwi_state_full(const char *mailbox, const char *context, struct a
stasis_publish(mailbox_specific_topic, clear_msg);
}
stasis_topic_pool_delete_topic(mwi_topic_pool, stasis_topic_name(mailbox_specific_topic));
stasis_topic_pool_delete_topic(mwi_topic_pool, mwi_state->uniqueid);
ao2_cleanup(clear_msg);
return 0;
@@ -3430,7 +3430,7 @@ int app_init(void)
if (STASIS_MESSAGE_TYPE_INIT(ast_mwi_vm_app_type) != 0) {
return -1;
}
mwi_topic_all = stasis_topic_create("stasis_mwi_topic");
mwi_topic_all = stasis_topic_create("mwi:all");
if (!mwi_topic_all) {
return -1;
}
@@ -3446,7 +3446,7 @@ int app_init(void)
if (!mwi_topic_pool) {
return -1;
}
queue_topic_all = stasis_topic_create("stasis_queue_topic");
queue_topic_all = stasis_topic_create("queue:all");
if (!queue_topic_all) {
return -1;
}