TipcMsgSetLbMode set the load balancing mode of a message
msg
message to set load balancing mode for
lb_mode
message load balancing mode (T_IPC_LB_NONE, T_IPC_LB_ROUND_ROBIN, T_IPC_LB_WEIGHTED, or T_IPC_LB_SORTED)
TRUE
if the load balancing mode was successfully set for the message, FALSE
otherwise.
If TipcMsgSetLbMode fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcMsgSetLbMode sets the load balancing mode of a message. The load balancing mode of a message controls how (or if) the message is load balanced between RTclients subscribed to a load balanced subject. Valid modes are T_IPC_LB_NONE, T_IPC_LB_ROUND_ROBIN, T_IPC_LB_WEIGHTED, and T_IPC_LB_SORTED. TipcMsgSetLbMode overwrites the default value of the load balancing mode property set by TipcMtSetLbMode.
The default load balancing mode is T_IPC_LB_NONE. In this mode, no load balancing is done. The message is delivered to all RTclients subscribing to the subject to which the message is published.
The other load balancing modes are T_IPC_LB_ROUND_ROBIN, T_IPC_LB_WEIGHTED, and T_IPC_LB_SORTED. In these modes, one and only one RTclient in the list of potential receivers receives the message. In ROUND_ROBIN mode, each successive message is sent to the next RTclient in a circular list of RTclients, to distribute the load evenly. WEIGHTED mode sends the message to the most responsive RTclient (as measured by the fewest pending GMD acknowledgments), reasoning that this is also the RTclient with the least load. In SORTED mode, each message is sent to the RTclient whose unique subject name sorts lowest lexicographically.
For more information on load balancing, see the TIBCO SmartSockets User’s Guide.
None
TipcMsgGetLbMode, TipcMtGetLbMode, TipcMtSetLbMode
This example sets the load balancing mode of a message to T_IPC_LB_WEIGHTED:
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |