> tibemsTopic
> Type
> Purpose
> Topics deliver each message to multiple consumers.

> Function | Description | Page
> tibemsTopic_Create | Create a topic object. | 157
> tibemsTopic_Destroy | Destroy a topic object. | 158
> tibemsTopic_GetTopicName | Get the name of a topic object. | 159

> Related Types
> tibemsDestination on page 144
> tibemsTemporaryTopic on page 155
> tibemsTopic_Create
> Function
> Purpose
> Create a topic object.
> C Declaration
> tibems_status tibemsTopic_Create(
> tibemsTopic* topic,
> const char* topicName );
> COBOL Call
> CALL "tibemsTopic_Create"
> USING BY REFERENCE topic,
> BY REFERENCE topicName,
> RETURNING tibems-status
> END-CALL.

> | topic has usage pointer.

> Parameters

> Parameter | Description
> topic | The function stores the topic object in this location.
> topicName | Create a local topic instance with this name.

> Remarks
> This constructor creates only local objects (within the program). It does not attempt to bind the local topic object to the corresponding server object until the program creates a tibemsMsgConsumer or a tibemsMsgProducer that uses the topic.
> The bind can fail for the following reasons:

> ● | Authorization is enabled for the topic and the user does not have the appropriate permissions.

> ● | The topic does not exist and the server cannot dynamically create the topic.

> See Also
> tibemsLookupContext on page 322
> tibemsTopic_Destroy
> Function
> Purpose
> Destroy a topic object.
> C Declaration
> tibems_status tibemsTopic_Destroy(
> tibemsTopic topic );
> COBOL Call
> CALL "tibemsTopic_Destroy"
> USING BY VALUE topic,
> RETURNING tibems-status
> END-CALL.

> | topic has usage pointer.

> Parameters

> Parameter | Description
> topic | Destroy this topic object.

> tibemsTopic_GetTopicName
> Function
> Purpose
> Get the name of a topic object.
> C Declaration
> tibems_status tibemsTopic_GetTopicName(
> tibemsTopic topic,
> char* name,
> tibems_int name_len );
> COBOL Call
> CALL "tibemsTopic_GetTopicName"
> USING BY VALUE topic,
> BY REFERENCE name,
> BY VALUE name-len,
> RETURNING tibems-status
> END-CALL.

> | topic has usage pointer.

> Parameters

> Parameter | Description
> topic | Get the name of this topic.
> name | The function copies the name to this location.
> name_len | Length of the name buffer.

> Remarks
> A null character terminates the copied name string.
> Your program must allocate the name buffer, and pass its length to the function. If the length of the topic name is greater than the size of the buffer provided, the entire topic name may not be copied. The buffer size is determined by the TIBEMS_DESTINATION_MAX constant. Constants such as TIBEMS_DESTINATION_MAX are located in the tibems/types.h header file.

Copyright © TIBCO Software Inc. All Rights Reserved.