book
Article ID: KB0091061
calendar_today
Updated On:
Description
Resolution:
Description:
= = = = = = =
We have an event queue maintained at client. You could set the queue limit properties of a queue:
tibrv_status tibrvQueue_SetLimitPolicy(
tibrvQueue eventQueue,
tibrvQueueLimitPolicy policy,
tibrv_u32 maxEvents,
tibrv_u32 discardAmount);
eventQueue: Set the limit properties of this queue.
policy: 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 on page. When maxEvents is zero (unlimited), the policy must be
TIBRVQUEUE_DISCARD_NONE.
maxEvents: Programs can limit the number of events that a queue can hold—either to curb queue growth or implement a specialized dispatch semantics.
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 function sets the discard amount of the queue to that value.
If you did not set LimitPolicy, by default maxEvents is zero (unlimited), the policy is TIBRVQUEUE_DISCARD_NONE. In this case, if the application is a slow consumer it will cause a lot of pending messages in the queue. This may cause
both JVM heap memory usage and native memory usage to increase.
As the event queue is maintained through JNI, If your application is running out of native memory, check if you can decrease the JVM initial Java heap size setting (-Xms) to leave more native memory for this queue.
Issue/Introduction
Is it possible to increase the size/ length of the RV Queue at the client application? Can the RVQueue in any way be influenced by the client Java program's Java heap setting?