# tibemsConsumerInfo_IsActive

Function

## Purpose

Get the active status of the consumer.

## C Declaration

    tibems_status tibemsConsumerInfo_IsActive(
        tibemsConsumerInfo consumerInfo,
        tibems_bool* active);

## COBOL Call

    CALL "tibemsConsumerInfo_IsActive"
     USING BY VALUE consumerInfo,
           BY REFERENCE active,
           RETURNING tibems-status
    END-CALL.

## Parameters

Parameter | Description
--- | ---
`consumerInfo` | Get the status of this consumer.
`active` | Store consumer status.

## Remarks

If the consumer is active, the active status is `TRUE`. Otherwise, active is `FALSE`. A consumer is active if the server can send messages to it. Only queue consumers which have never called a receive function remain in inactive state.

Queue consumers which called have called`tibemsMsgConsumer_Receive`, `tibemsMsgConsumer_ReceiveNoWait`, or `tibemsMsgConsumer_ReceiveTimeout` at least once or are configured with a message callback, and all topic consumers are always active. This function can identify inactive queue consumers which have never called a receive function which and have never received any messages from the server, even when pending messages exist in the corresponding queue.

## See Also

`tibemsMsgConsumer_Receive`

`tibemsMsgConsumer_ReceiveNoWait`

`tibemsMsgConsumer_ReceiveTimeout`

Copyright © Cloud Software Group, Inc. All rights reserved.