Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 5 Producer : tibemsMsgProducer : tibemsMsgProducer_Send

tibemsMsgProducer_Send
Function
Purpose
Send a message.
C Declaration
tibems_status tibemsMsgProducer_Send(
    tibemsMsgProducer msgProducer,
    tibemsMsg message );
 
tibems_status tibemsMsgProducer_SendEx(
    tibemsMsgProducer msgProducer,
    tibemsMsg message,
    tibems_int deliveryMode,
    tibems_int priority,
    tibems_long timeToLive );
 
tibems_status tibemsMsgProducer_SendToDestination(
    tibemsMsgProducer msgProducer,
    tibemsDestination destination,
    tibemsMsg message );
 
tibems_status tibemsMsgProducer_SendToDestinationEx(
    tibemsMsgProducer msgProducer,
    tibemsDestination destination,
    tibemsMsg message,
    tibemsDeliveryMode deliveryMode,
    tibems_int priority,
    tibems_long timeToLive );
COBOL Call
CALL "tibemsMsgProducer_Send"
USING BY VALUE msgProducer,
BY VALUE message,
RETURNING tibems-status
END-CALL.
 
CALL "tibemsMsgProducer_SendEx"
USING BY VALUE msgProducer,
BY VALUE message,
BY VALUE deliveryMode,
BY VALUE priority,
BY VALUE timeToLive,
RETURNING tibems-status
END-CALL.
 
CALL "tibemsMsgProducer_SendToDestination"
USING BY VALUE msgProducer,
BY VALUE destination,
BY VALUE message,
RETURNING tibems-status
END-CALL.
CALL "tibemsMsgProducer_SendToDestinationEx"
USING BY VALUE msgProducer,
BY VALUE destination,
BY VALUE message,
BY VALUE deliveryMode,
BY VALUE priority,
BY VALUE timeToLive,
RETURNING tibems-status
END-CALL.
 
msgProducer, message and destination have usage pointer.
Parameters
 
Other send calls send the message to the producer’s default destination. When the producer does not specify a default, the send call must supply this parameter.
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.
If the time-to-live is non-zero, the expiration is the sum of that time-to-live and the sending client’s current time (GMT). This rule applies even within sessions with transaction semantics—the timer begins with the send call, not the commit call.
If the time-to-live is zero, then expiration is also zero—indicating that the message never expires.
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.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved