feat(stellar mq): add dispatch_cb per topic

This commit is contained in:
yangwei
2024-09-05 18:58:17 +08:00
parent a36865275d
commit b8b8bc1add
4 changed files with 119 additions and 125 deletions

View File

@@ -37,7 +37,7 @@ struct plugin_manager_schema
UT_array *plugin_load_specs_array;
UT_array *stellar_exdata_schema_array;
UT_array *stellar_mq_schema_array;
UT_array *registered_packet_plugin_array;
UT_array *registered_plugin_array;
UT_array *registered_polling_plugin_array;
int stellar_mq_topic_num;
int mq_topic_subscriber_num;
@@ -93,6 +93,7 @@ struct stellar_mq_topic_schema
int topic_id;
int subscriber_cnt;
int is_destroyed;
on_msg_dispatch_cb_func *dispatch_cb;
stellar_msg_free_cb_func *free_cb;
struct stellar_mq_subscriber *subscribers;
}__attribute__((aligned(sizeof(void*))));
@@ -105,12 +106,12 @@ enum packet_stage
PACKET_STAGE_MAX
};
struct registered_packet_plugin_schema
struct registered_plugin_schema
{
char ip_protocol;
plugin_on_packet_func *on_packet[PACKET_STAGE_MAX];
void *plugin_env;
UT_array *registed_packet_mq_subscriber_info;
UT_array *registed_mq_subscriber_info;
}__attribute__((aligned(sizeof(void*))));
struct registered_polling_plugin_schema