VxWorks API Reference : OS Libraries

msgQDistGrpLib

NAME

msgQDistGrpLib - distributed message queue group library (VxFusion option)

ROUTINES

msgQDistGrpAdd( ) - add a distributed message queue to a group (VxFusion option)
msgQDistGrpDelete( ) - delete a distributed message queue from a group (VxFusion option)

DESCRIPTION

This library provides the grouping facility for distributed message queues. Single distributed message queues can join one or more groups. A message sent to a group is sent to all message queues that are members of that group. A group, however, is prohibited from sending messages. Also, it is an error to call msgQDistNumMsgs( ) with a distributed message queue group ID.

Groups are created with symbolic names and identified by a unique ID,
 MSG_Q_ID, as with normal message queues.

If the group is new to the distributed system, the group agreement protocol (GAP) is employed to determine a globally unique identifier. As part of the protocol's negotiation, all group databases throughout the system are updated.

The distributed message queue group library is initialized by calling distInit( ).

AVAILABILITY

This module is distributed as a component of the unbundled distributed message queues option, VxFusion.

INCLUDE FILES

msgQDistGrpLib.h

SEE ALSO

distLib, msgQDistGrpShow


OS Libraries : Routines

msgQDistGrpAdd( )

NAME

msgQDistGrpAdd( ) - add a distributed message queue to a group (VxFusion option)

SYNOPSIS

MSG_Q_ID msgQDistGrpAdd
    (
    char *       distGrpName, /* new or existing group name */
    MSG_Q_ID     msgQId,      /* message queue to add to the group */
    DIST_GRP_OPT options      /* group message queue options - UNUSED */
    )

DESCRIPTION

This routine adds the queue identified by the argument msgQId to a group with the ASCII name specified by the argument distGrpName.

Multicasting is based on distributed message queue groups. If the group does not exist, one is created. Any number of message queues from different nodes can be bound to a single group. In addition, a message queue can be added into any number of groups; msgQDistGrpAdd( ) must be called for each group of which the message queue is to be a member.

The options parameter is presently unused and must be set to 0.

This routine returns a message queue ID, MSG_Q_ID, that can be used directly by msgQDistSend( ) or by the generic msgQSend( ) routine. Do not call the msgQReceive( ) or msgQNumMsgs( ) routines or their distributed counterparts, msgQDistReceive( ) and msgQDistNumMsgs( ), with a group message queue ID.

As with msgQDistCreate( ), use distNameAdd( ) to add the group message queue ID returned by this routine to the distributed name database so that the ID can be used by tasks on other nodes.

AVAILABILITY

This routine is distributed as a component of the unbundled distributed message queues option, VxFusion.

RETURNS

MSG_Q_ID, or NULL if there is an error.

ERRNO

S_msgQDistGrpLib_NAME_TOO_LONG
The name of the group is too long.
S_msgQDistGrpLib_INVALID_OPTION
The options parameter is invalid.
S_msgQDistGrpLib_DATABASE_FULL
The group database is full.
S_distLib_OBJ_ID_ERROR
The msgQId parameter is not a distributed message queue.

SEE ALSO

msgQDistGrpLib, msgQLib, msgQDistLib, distNameLib


OS Libraries : Routines

msgQDistGrpDelete( )

NAME

msgQDistGrpDelete( ) - delete a distributed message queue from a group (VxFusion option)

SYNOPSIS

STATUS msgQDistGrpDelete
    (
    char *   distGrpName,     /* group containing the queue to be deleted */
    MSG_Q_ID msgQId           /* ID of the message queue to delete */
    )

DESCRIPTION

This routine deletes a distributed message queue from a group.

NOTE

For this release, it is not possible to remove a distributed message queue from a group.

AVAILABILITY

This routine is distributed as a component of the unbundled distributed message queues option, VxFusion.

RETURNS

ERROR, always.

ERRNO

S_distLib_NO_OBJECT_DESTROY

SEE ALSO

msgQDistGrpLib