Open topic with navigation

TIBCO Rendezvous® 8.8.0

# TibrvQueue::setLimitPolicy()

Method

## Declaration

    TibrvStatus setLimitPolicy (
        tibrvQueueLimitPolicy policy,
        tibrv_u32 maxEvents,
        tibrv_u32 discardAmount);

## Purpose

Set the limit properties of a queue.

## Remarks

This method simultaneously sets three related properties, which together describe the behavior of a queue in overflow situations. Each call must explicitly specify all three properties.

Parameter | Description
`limitPolicy` | Each queue has a policy for discarding events when a new event would cause the queue to exceed its `maxEvents` limit. Choose from the values of `tibrvQueueLimitPolicy`. When `maxEvents` is zero (unlimited), the `policy` must be `TIBRVQUEUE_DISCARD_NONE.` The program supplies a value, and the method sets the limit policy of the queue to that value.
`maxEvents` | Programs can limit the number of events that a queue can hold—either to curb queue growth, or implement a specialized dispatch semantics. Zero specifies an unlimited number of events; in this case, the `policy` must be `TIBRVQUEUE_DISCARD_NONE.` The program supplies a value, and the method sets the maximum event limit of the queue to that value.
`discardAmount` | When the queue exceeds its maximum event limit, discard a block of events. This property specifies the number of events to discard. When `discardAmount` is zero, the `policy` must be `TIBRVQUEUE_DISCARD_NONE.` The program supplies a value, and the method sets the discard amount of the queue to that value.

## See Also

TibrvQueue::getLimitPolicy()

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Rendezvous®

Copyright © 1997-2025. Cloud Software Group, Inc. All Rights Reserved.