Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

ctSysQueueCount

Return the number of messages waiting in the queue.

Short Name

ctSysQueueCount()

Type

ISAM function.

Declaration

NINT ctSysQueueCount(NINT qhandle)

Description

ctSysQueueCount() can be used to obtain the number of messages waiting in the system queue.

Parameter qhandle is a system queue handle returned by a call to ctSysQueueOpen().

Return

ctSysQueueCount returns the number of messages in the queue, or a negative number on error.

Value

Symbolic Constant

Explanation

-90

NQUE_ERR

Could not create queue.

-514

CQUE_ERR

Queue has already been closed.

See FairCom DB Error Codes for a complete listing of valid FairCom DB error values.

Example

/* check the number of messages on a queue */

NINT count = ctSysQueueCount(qhandle);


if (count >= 0)

printf("There are %d messages on my queue\n", count);

else

printf("ctSysQueueCount failed with code %d\n", -count);

Limitations

Client/Server mode only.

See also

ctSysQueueRead

TOCIndex