Diffusion C API  6.1.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
svc-topic-add.h File Reference

Add topic feature (topic control). More...

Data Structures

struct  svc_topic_add_request_s
 Structure describing an "topic add" request. More...
 
struct  svc_topic_add_response_s
 
struct  add_topic_callback_s
 add_topic_from_specification callback More...
 

Typedefs

typedef struct
svc_topic_add_request_s 
SVC_TOPIC_ADD_REQUEST_T
 Structure describing an "topic add" request.
 
typedef int(* on_topic_add_cb )(SESSION_T *session, TOPIC_ADD_RESULT_CODE result_code, void *context)
 Callback for add_topic_from_specification(). More...
 
typedef int(* on_topic_add_failed_cb )(SESSION_T *session, TOPIC_ADD_FAIL_RESULT_CODE result_code, const DIFFUSION_ERROR_T *error, void *context)
 Callback for add_topic_from_specification(). More...
 
typedef struct add_topic_callback_s ADD_TOPIC_CALLBACK_T
 add_topic_from_specification callback
 

Enumerations

enum  TOPIC_ADD_FAIL_RESULT_CODE {
  TOPIC_ADD_FAIL_EXISTS_MISMATCH, TOPIC_ADD_FAIL_INVALID_NAME, TOPIC_ADD_FAIL_INVALID_DETAILS, TOPIC_ADD_FAIL_PERMISSIONS_FAILURE,
  TOPIC_ADD_FAIL_UNEXPECTED_ERROR, TOPIC_ADD_FAIL_CLUSTER_REPARTITION, TOPIC_ADD_FAIL_EXCEEDED_LICENSE_LIMIT, TOPIC_ADD_FAIL_INCOMPATIBLE_PARENT,
  TOPIC_ADD_FAIL_INCOMPATIBLE_MASTER, TOPIC_ADD_FAIL_EXISTS_INCOMPATIBLE
}
 

Detailed Description

Add topic feature (topic control).

Typedef Documentation

typedef int(* on_topic_add_cb)(SESSION_T *session, TOPIC_ADD_RESULT_CODE result_code, void *context)

Callback for add_topic_from_specification().

Parameters
sessionThe current active session.
result_codeThe result code from the topic add request.
contextUser-supplied context from the initial add_topic_from_specification() call.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.
typedef int(* on_topic_add_failed_cb)(SESSION_T *session, TOPIC_ADD_FAIL_RESULT_CODE result_code, const DIFFUSION_ERROR_T *error, void *context)

Callback for add_topic_from_specification().

Parameters
sessionThe current active session.
result_codeThe topic add failure result code
errorThe error reason. This will only be set if this function is called through the callback
contextUser-supplied context from the initial add_topic_from_specification() call.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.

Enumeration Type Documentation

Enumerator
TOPIC_ADD_FAIL_EXISTS_MISMATCH 

A topic already exists with the same path but a different specification.

TOPIC_ADD_FAIL_INVALID_NAME 

The supplied topic path is invalid.

TOPIC_ADD_FAIL_INVALID_DETAILS 

Some aspect of the topic specification failed validation.

TOPIC_ADD_FAIL_PERMISSIONS_FAILURE 

The client was denied permission to add a topic of the specified type at the given point in the topic hierarchy.

TOPIC_ADD_FAIL_UNEXPECTED_ERROR 

An unexpected error occurred whilst attempting to create the topic.

See the server log for more details.

TOPIC_ADD_FAIL_CLUSTER_REPARTITION 

Adding the topic failed because the cluster was repartitioning due to a server starting, stopping, or failing.

The operation can be retried.

TOPIC_ADD_FAIL_EXCEEDED_LICENSE_LIMIT 

Adding the topic failed because of a license limit.

TOPIC_ADD_FAIL_INCOMPATIBLE_PARENT 

Adding the topic failed because a topic owned by a publisher is already bound to the parent path.

TOPIC_ADD_FAIL_INCOMPATIBLE_MASTER 

Adding a slave topic failed because a topic owned by a publisher is already bound to the specified master path.

TOPIC_ADD_FAIL_EXISTS_INCOMPATIBLE 

Adding the topic failed because a topic is already bound to the specified path but the caller does not have the rights to manage it.