VxWorks Reference Manual : Libraries

msgQDistGrpLib

NAME

msgQDistGrpLib - distributed message queue group library (VxFusion)

ROUTINES

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

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( ).

INCLUDE FILES

msgQDistGrpLib.h

SEE ALSO

msgQDistGrpLib, distLib, msgQDistGrpShow


Libraries : Routines

msgQDistGrpAdd( )

NAME

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

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.

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


Libraries : Routines

msgQDistGrpDelete( )

NAME

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

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.

RETURNS

ERROR, always.

SEE ALSO

msgQDistGrpLib