Updated: April 19, 2023 |
Create a named topic
#include <pips/publication.h>
pips_topic_t* pips_create_topic(const char *const topic_name, const char *const opt_type_name, const char *const opt_provider_name)
This function creates a named topic of the specified type. Then, it initializes the type's peer implementation in the publish/subscribe middleware associated with either the specified provider or the default provider if no provider name is given.
On success, a pointer to the pips_topic_t structure representing the new topic. The caller owns the topic and hence, is responsible for deleting its memory using pips_delete_topic(). On error, this function returns NULL and sets errno.
Additional error codes may be set by the provider implementation.