Function
Publish a message to a topic.
tibems_status
tibemsTopicPublisher_Publish(tibemsTopicPublisher
topicPublisher,tibemsMsg
message
);tibems_status
tibemsTopicPublisher_PublishEx(tibemsTopicPublisher
topicPublisher,tibemsMsg
message
,tibemsDeliveryMode
deliveryMode,tibems_int
priority,tibems_long
timeToLive );tibems_status
tibemsTopicPublisher_PublishToTopic(tibemsTopicPublisher
topicPublisher,tibemsTopic
topic,tibemsMsg
message
);tibems_status
tibemsTopicPublisher_PublishToTopicEx(tibemsTopicPublisher
topicPublisher,tibemsTopic
topic,tibemsMsg
message,tibemsDeliveryMode
deliveryMode,tibems_int
priority,tibems_long
timeToLive );
CALL "tibemsTopicPublisher_Publish" USING BY VALUE topicPublisher, BY VALUEmessage
, RETURNING tibems-status END-CALL. CALL "tibemsTopicPublisher_PublishEx" USING BY VALUE topicPublisher, BY VALUEmessage
, BY VALUE deliveryMode, BY VALUE priority, BY VALUE timeToLive, RETURNING tibems-status END-CALL. tibemsTopicPublisher_PublishToTopic CALL "tibemsTopicPublisher_PublishToTopic" USING BY VALUE topicPublisher, BY VALUEtopic
, BY VALUEmessage
, RETURNING tibems-status END-CALL. CALL "tibemsTopicPublisher_PublishToTopicEx" USING BY VALUE topicPublisher, BY VALUEtopic
, BY VALUEmessage
, BY VALUE deliveryMode, BY VALUE priority, BY VALUE timeToLive, RETURNING tibems-status END-CALL.
These calls are parallel to the send calls of tibemsMsgProducer
, and they accomplish the same goalsending messages.
Parameter
|
Description
|
---|---|
topicPublisher
|
Send a message through this publisher object.
|
topic
|
When present, the call sends the message to this topic.
Other calls send the message to the publisher’s default topic. When the publisher does not specify a default, the publish call must supply this parameter.
|
message
|
Publish this message.
|
deliveryMode
|
When present, the call sends the message with this delivery mode.
This argument may be either an enumerated value (see
tibemsDeliveryMode ) or an integer (see tibemsDeliveryMode ). We recommend enumerated values, because they enable .NET to do stronger type checking at compile time, which can enhance program reliability.
Other calls send the message with the publisher’s default delivery mode.
|
priority
|
When present, the call sends the message with this priority.
Priority affects the order in which the server delivers messages to consumers (higher values first). The JMS specification defines ten levels of priority value, from zero (lowest priority) to 9 (highest priority). The specification suggests that clients consider 0–4 as gradations of normal priority, and priorities 5–9 as gradations of expedited priority.
Other calls send the message with the publisher’s default priority.
|
timeToLive
|
When present, the call uses this value (in milliseconds) to compute the message expiration.
Other calls use the publisher’s default value to compute expiration.
Whenever your application uses non-zero values for message expiration or time-to-live, you must ensure that clocks are synchronized among all the host computers that send and receive messages. Synchronize clocks to a tolerance that is a very small fraction of the smallest or time-to-live.
|
TIBCO Enterprise Message Service™ C and COBOL Reference System Release 4.3, February 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |