Clients use message producers to send messages. A message producer object can store several parameters that affect the messages it sends.
tibems_status tibemsMsgProducer_Close(tibemsMsgProducer msgProducer );
msgProducer has usage pointer.
This call also notifies the server that the client program is closing the producer. In response, the server reclaims storage associated with the producer.tibems_status tibemsMsgProducer_GetDeliveryMode(tibemsMsgProducer msgProducer,tibems_int* deliveryMode );
msgProducer has usage pointer.
Programs can use this property to define a default delivery mode for messages that this producer sends. Individual sending calls can override this default value.tibems_status tibemsMsgProducer_GetDestination(tibemsMsgProducer msgProducer,tibemsDestination* destination );
msgProducer and destination have usage pointer.
Programs can use this property to define a default destination for messages that this producer sends. Individual sending calls can override this default value.tibems_status tibemsMsgProducer_GetDisableMessageID(tibemsMsgProducer msgProducer,tibems_bool* disable );
msgProducer has usage pointer.
Applications that do not require message IDs can reduce overhead costs by disabling IDs (set this property to true).tibems_status tibemsMsgProducer_GetDisableMessageTimestamp(tibemsMsgProducer msgProducer,tibems_bool* disable );
msgProducer has usage pointer.
The function stores the property in this location.Applications that do not require timestamps can reduce overhead costs by disabling timestamps (set this property to true).Get the mode that defines when a producer checks the result of sending a NON_PERSISTENT message.extern tibems_status tibemsMsgProducer_GetNPSendCheckMode(
msgProducer has usage pointer.
The function stores the mode in this location. Must not be null.See tibemsNpCheckMode on page 129 for details.This function returns the send check mode set by the tibemsMsgProducer_SetNPSendCheckMode function. If the returned value is NPSEND_CHECK_DEFAULT, then the effective mode can be set by the server parameter applied to all producers.tibems_status tibemsMsgProducer_GetPriority(tibemsMsgProducer msgProducer,tibems_int* priority );
msgProducer has usage pointer.
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.Programs can use this property to define a default priority for messages that this producer sends. Individual sending calls can override this default value.tibems_status tibemsMsgProducer_GetTimeToLive(tibemsMsgProducer msgProducer,tibems_long* timeToLive );
msgProducer has usage pointer.
• 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.Programs can use this property to define a default time-to-live for messages that this producer sends. Individual sending calls can override this default value.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.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 );
When present, the call sends the message to this destination (queue or topic).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. Other send calls send the message with the producer’s default delivery mode. 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 send calls send the message with the producer’s default priority. When present, the call uses this value (in milliseconds) to compute the message expiration.
• 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.tibems_status tibemsMsgProducer_SetDeliveryMode(tibemsMsgProducer msgProducer,tibems_int deliveryMode );
msgProducer has usage pointer.
Programs can use this property to define a default delivery mode for messages that this producer sends. Individual sending calls can override this default value.tibems_status tibemsMsgProducer_SetDisableMessageID(tibemsMsgProducer msgProducer,tibems_bool disable );
msgProducer has usage pointer.
Applications that do not require message IDs can reduce overhead costs by disabling IDs (set this property to true).tibems_status tibemsMsgProducer_SetDisableMessageTimestamp(tibemsMsgProducer msgProducer,tibems_bool disable );
msgProducer has usage pointer.
Applications that do not require timestamps can reduce overhead costs by disabling timestamps (set this property to true).extern tibems_status tibemsMsgProducer_SetNPSendCheckMode(tibemsNpCheckMode mode);
msgProducer has usage pointer.
The send check mode. See tibemsNpCheckMode on page 129 for details.tibemsNpCheckMode only applies to messages sent using the NON_PERSISTENT delivery mode, using non-transactional Session. It does not apply to cases when message was sent using PERSISTENT or RELIABLE_DELIVERY delivery modes, or if the corresponding Session is transactional.If the producer's send check mode is not set, it may execute the mode applied globally to all producers via EMS server parameter. Setting any mode other than NPSEND_CHECK_DEFAULT unconditionally overrides global setting defined by the server.Normally applications use the server's setting or configure producers with a specific send mode only once. However, if required, applications may choose to change this mode before sending every message.If a producer does not check the result of sending a message, it will not know if a problem has occurred and the message was not processed by the server. If the producer checks the result of the send, the send method will receive the server's response to the send and throw the appropriate exception if any problem has occurred. However, checking the result of sending a message will reduce the performance of the producer.tibems_status tibemsMsgProducer_SetPriority(tibemsMsgProducer msgProducer,tibems_int priority );
msgProducer has usage pointer.
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.Programs can use this property to define a default priority for messages that this producer sends. Individual sending calls can override this default value.tibems_status tibemsMsgProducer_SetTimeToLive(tibemsMsgProducer msgProducer,tibems_long timeToLive );
msgProducer has usage pointer.
• 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.Programs can use this property to define a default time-to-live for messages that this producer sends. Individual sending calls can override this default value.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.