|
TIBCO FTL®
|
Destination Publisher objects send messages. More...
Macros | |
| #define | TIB_DEST_PUBLISHER_PROPERTY_BOOL_RELEASE_MSGS_TO_SEND "com.tibco.ftl.client.publisher.release" |
| Ownership of outbound messages; boolean. More... | |
| #define | TIB_DEST_PUBLISHER_PROPERTY_DOUBLE_PERSISTENCE_CLOSE_LINGER "com.tibco.ftl.client.publisher.persistence.close.linger" |
| Linger duration for persistent destination publisher close operation; double. More... | |
| #define | TIB_DEST_PUBLISHER_PROPERTY_DOUBLE_PERSISTENCE_RETRY_DURATION "com.tibco.ftl.client.publisher.persistence.retry.duration" |
| Retry duration for persistent destination publisher operations; double. More... | |
| #define | TIB_DEST_PUBLISHER_PROPERTY_INT_MAX_BATCH_COUNT "com.tibco.ftl.client.publisher.max.batch" |
| Maximum batch count for non-inline destination publishers; integer. More... | |
| #define | TIB_DEST_PUBLISHER_PROPERTY_INT_SEND_POLICY "com.tibco.ftl.client.publisher.send.policy" |
| Destination Publisher send policy; integer. More... | |
| #define | TIB_DEST_PUBLISHER_PROPERTY_STRING_LABEL "com.tibco.ftl.client.publisher.label" |
| Property name for a destination publisher label; string. More... | |
Typedefs | |
| typedef struct __tibDestPublisherId * | tibDestPublisher |
| A destination publisher object realizes the message-sending functionality of a destination within a program. More... | |
Enumerations | |
| enum | tibDestPublisher_SendPolicy { TIB_DEST_PUBLISHER_SEND_INLINE = 0 , TIB_DEST_PUBLISHER_SEND_NON_INLINE = 1 } |
Functions | |
| TIB_API void | tibDestPublisher_Close (tibEx e, tibDestPublisher destPublisher) |
| Close a destination publisher. More... | |
| TIB_API void | tibDestPublisher_Flush (tibEx e, tibDestPublisher destPublisher) |
| Flush the destPublisher. More... | |
| TIB_API int | tibDestPublisher_GetMaxBatchCount (tibEx e, tibDestPublisher destPublisher) |
| Returns the maximum batch count of a non-inline destination publisher. More... | |
| TIB_API tibDestPublisher_SendPolicy | tibDestPublisher_GetSendPolicy (tibEx e, tibDestPublisher destPublisher) |
| Returns the send policy of a destination publisher. More... | |
| TIB_API void | tibDestPublisher_Send (tibEx e, tibDestPublisher destPublisher, const char *dest, tibMessage message) |
| Send a message to a destination. More... | |
| TIB_API void | tibDestPublisher_SendMessages (tibEx e, tibDestPublisher destPublisher, const char *destination, tibMessage *messages, tibint32_t count) |
| Send a batch of messages to a destination. More... | |
| TIB_API void | tibDestPublisher_SendReply (tibEx e, tibDestPublisher destPublisher, tibMessage reply, tibMessage request) |
| Send a reply message to a request message. More... | |
| TIB_API tibMessage | tibDestPublisher_SendRequest (tibEx e, tibDestPublisher destPublisher, const char *dest, tibMessage request, tibdouble_t timeout) |
| Send a request message to a destination. More... | |
Destination Publisher objects send messages.
This file defines destination publisher objects and calls that send messages.
| #define TIB_DEST_PUBLISHER_PROPERTY_BOOL_RELEASE_MSGS_TO_SEND "com.tibco.ftl.client.publisher.release" |
Ownership of outbound messages; boolean.
When tibfalse or absent, client program code retains ownership of outbound messages that it sends through this destination publisher.
When tibtrue, the FTL library accepts ownership of outbound messages that the client sends through this destination publisher. Client code releases the message object when it invokes the send call; from that moment onward, client code must not reference the message object, because the FTL library can destroy the message object at any time.
Client code can release a message only if client owns the message. In particular, if a dest subscriber does not release its messages to the callback, then the callback must not send it through a publisher that releases messages. (See TIB_DEST_SUBSCRIBER_PROPERTY_BOOL_RELEASE_MSGS_TO_CALLBACK .)
| #define TIB_DEST_PUBLISHER_PROPERTY_DOUBLE_PERSISTENCE_CLOSE_LINGER "com.tibco.ftl.client.publisher.persistence.close.linger" |
Linger duration for persistent destination publisher close operation; double.
When a persistence destination publisher is configured for non-inline send, and a call to tibDestPublisher_Close is made while there are still messages waiting to be persisted, the call can be configured to wait for some time before closing the destination publisher. If the linger period elapses, and the messages have not been successfully persisted, the messages will be discarded. Set this property to control the linger behavior of tibDestPublisher_Close . The default value is 30 seconds.
Values:
Closing the realm supersedes and cancels linger behavior.
| #define TIB_DEST_PUBLISHER_PROPERTY_DOUBLE_PERSISTENCE_RETRY_DURATION "com.tibco.ftl.client.publisher.persistence.retry.duration" |
Retry duration for persistent destination publisher operations; double.
When tibRealm_CreateDestPublisher tibDestPublisher_Send, or tibDestPublisher_SendMessages cannot access the persistence server (usually because of network failure or quorum unavailability), they can automatically retry the interaction. The value of this property overrides the retry behavior of the server. Supply it to the publisher create call.
Values:
Closing the destination publisher or the realm supersedes and cancels retry behavior.
| #define TIB_DEST_PUBLISHER_PROPERTY_INT_MAX_BATCH_COUNT "com.tibco.ftl.client.publisher.max.batch" |
Maximum batch count for non-inline destination publishers; integer.
When a persistence destination publisher is configured for non-inline send, this is the maximum number of messages that may be in flight to the persistence service at any given time. When this limit is reached, tibPublisher_Send blocks until some messages can be persisted, or a failure occurs. The default value is 100.
The tibDestPublisher_GetMaxBatchCount call returns the value currently in effect.
| #define TIB_DEST_PUBLISHER_PROPERTY_INT_SEND_POLICY "com.tibco.ftl.client.publisher.send.policy" |
Destination Publisher send policy; integer.
Optimize the destination publisher for lower latency or greater throughput. The default behavior depends on the realm configuration.
Values:
When publishing to a store, and the administrator has configured publisher mode store_confirm_send for the store, the inline send policy causes tibDestPublisher_Send and tibDestPublisher_SendMessages to block until the message(s) have been successfully persisted, or until a failure occurs.
When publishing to a store, and the administrator has configured publisher mode store_confirm_send for the store, the non-inline send policy changes the behavior of tibDestPublisher_Send .
The tibDestPublisher_GetSendPolicy call returns the value currently in effect.
| #define TIB_DEST_PUBLISHER_PROPERTY_STRING_LABEL "com.tibco.ftl.client.publisher.label" |
Property name for a destination publisher label; string.
It is good practice to include this property in every destination publisher create call. Monitoring data incorporates these labels so administrators can identify and distinguish among publishers. Use labels that reveal the unique role and identity of each publisher within the application program.
If a non-inline persistence destination publisher fails to persist a message, the resulting advisory will include the publisher label. See TIB_ADVISORY_NAME_NONINLINE_SEND_LOSS .
| typedef struct __tibDestPublisherId* tibDestPublisher |
A destination publisher object realizes the message-sending functionality of a destination within a program.
A destination publisher object encapsulates all the information that a program needs to send a stream of messages to a destination. Destination Publisher objects send messages to the persistence service that are then disseminate to interested subscribers.
Programs can use a destination publisher to send messages to a destination. Destinations can be of type queues or topics or map destinations, but destination publishers can only be created on destinations of type queue or topic.
Destination publishers can be of two types
| Enumerator | |
|---|---|
| TIB_DEST_PUBLISHER_SEND_INLINE | Publish with low latency; integer. |
| TIB_DEST_PUBLISHER_SEND_NON_INLINE | Publish with high throughput; integer. |
| TIB_API void tibDestPublisher_Close | ( | tibEx | e, |
| tibDestPublisher | destPublisher | ||
| ) |
Close a destination publisher.
Closing a destination publisher releases all the resources associated with it.
Closing the publisher may discard messages that have not yet been sent to the persistence service, subject to linger behavior.
Applications may wish to call tibDestPublisher_Flush before closing the publisher
| e | The exception object captures information about failures. |
| destPublisher | The call closes this destination publisher. |
| TIB_API void tibDestPublisher_Flush | ( | tibEx | e, |
| tibDestPublisher | destPublisher | ||
| ) |
Flush the destPublisher.
Application can call flush after tibDestPublisher_Send() and or tibDestPublisher_SendMessages and messages that are held in destPublisher's internal queues will all be flushed.
This is a synchronous call, and the call will return only after all the messages are flushed, however if the applications has not specified any retry duration then this call will return an exception in the event of a failure.
NOTE: If the destination publisher was created with a TIB_DEST_PUBLISHER_SEND_INLINE send policy see TIB_DEST_PUBLISHER_PROPERTY_INT_SEND_POLICY, then this API is no-op.
Application is responsible to keep track of dests and corresponding messages, so in the event of a failure they can resend those messages.
| e | The exception object captures information about failures. |
| destPublisher | The destPublisher object . |
| TIB_API int tibDestPublisher_GetMaxBatchCount | ( | tibEx | e, |
| tibDestPublisher | destPublisher | ||
| ) |
Returns the maximum batch count of a non-inline destination publisher.
Returns the maximum batch count that is in effect for this publisher. Applications may use this call to determine appropriate behavior if a non-inline persistence publisher fails to persist a message.
See TIB_DEST_PUBLISHER_PROPERTY_INT_MAX_BATCH_COUNT
| e | The exception object captures information about failures. |
| destPublisher | The destination publisher. |
| TIB_API tibDestPublisher_SendPolicy tibDestPublisher_GetSendPolicy | ( | tibEx | e, |
| tibDestPublisher | destPublisher | ||
| ) |
Returns the send policy of a destination publisher.
Returns the send policy that is in effect for this publisher. Applications may use this call to determine appropriate behavior if a persistence publisher fails to persist a message.
See TIB_DEST_PUBLISHER_PROPERTY_INT_SEND_POLICY
| e | The exception object captures information about failures. |
| destPublisher | The destination publisher. |
| TIB_API void tibDestPublisher_Send | ( | tibEx | e, |
| tibDestPublisher | destPublisher, | ||
| const char * | dest, | ||
| tibMessage | message | ||
| ) |
Send a message to a destination.
Destination publishers can be of two types
NOTE:
| e | The exception object captures information about failures. |
| destPublisher | The destPublisher object. |
| dest | The destination name. |
| message | The message to send. |
| TIB_API void tibDestPublisher_SendMessages | ( | tibEx | e, |
| tibDestPublisher | destPublisher, | ||
| const char * | destination, | ||
| tibMessage * | messages, | ||
| tibint32_t | count | ||
| ) |
Send a batch of messages to a destination.
Destination publishers can be of two types
NOTE:
| e | The exception object captures information about failures. |
| destPublisher | The destPublisher object. |
| destination | The destination name. |
| messages | The batch of messages to send. |
| count | The number of messages in the batch. |
| TIB_API void tibDestPublisher_SendReply | ( | tibEx | e, |
| tibDestPublisher | destPublisher, | ||
| tibMessage | reply, | ||
| tibMessage | request | ||
| ) |
Send a reply message to a request message.
When sending a reply, the destination publisher cannot be statically bound to a destination, since the reply needs to be sent to the 'reply' destination
NOTE: Passing a statically bound destination publisher here will result in an exception.
| e | The exception object captures information about failures. |
| destPublisher | The destPublisher object. |
| reply | The reply message. |
| request | The request message. |
| TIB_API tibMessage tibDestPublisher_SendRequest | ( | tibEx | e, |
| tibDestPublisher | destPublisher, | ||
| const char * | dest, | ||
| tibMessage | request, | ||
| tibdouble_t | timeout | ||
| ) |
Send a request message to a destination.
The request/reply API is a convenience API that allow for single request/reply.
The destination publisher object passed to this API can be an unbound publisher or if it's statically bound publisher then destination passed here can be NULL. The request will be sent to the destination specified here or to the statically bound publisher's destination.
| e | The exception object captures information about failures. |
| destPublisher | The destPublisher object. |
| dest | The destination name. |
| request | The request message. |
| timeout | The timeout. |