Skip to main content

How can the number of events entering the Notification Service be limited?

  • September 2, 2014
  • 0 replies
  • 0 views

Product: OpenFusion Notification Service

Version: 2.1 and above

Description:

How can the number of events entering the Notification Service be limited?

Solution:

There are two ways to control the the number of events entering the service: by using of the QoS property MaxEventsPerConsumer and the admin property MaxQueueLength.

While both can be used at once, these are applied at different points in the service.

The MaxQueueLength administrative property defines the maximum size of the master queue for the event channel. This should normally be set to a value much higher than any value of a MaxEventsPerConsumers QoS property.

When the MaxQueueLength is reached the event is dealt with according to the RejectNewEvents administration property. This has the following values:

TRUE - New events received by the event channel are rejected when the MaxQueueLength is exceeded. An IMP_LIMIT exception will be thrown to the supplier when this occurs. It is up to the supplier / user code to deal with this exception. The simplest approach is to wait before sending further events, so that the queue size drops as events are delivered. Note: One complication to the use of MaxQueueLength with RejectNewEvents set true is the auto-sequencing mechanism in V4. If a structured supplier with auto-sequencing enabled is used, the IMP_LIMIT exceptions will not be reliably passed to the supplier. If the use of IMP_LIMIT exception to control the service is intended in this manner, disable auto-sequencing or use a sequence supplier.

FALSE - New events received by the event channel will be discarded according to the DiscardPolicy QoS setting when the MaximumQueueLength is reached. Each proxy supplier has an internal queue, where events are stored after being passed by the channel and before delivery to the consumer.

The MaxEventsPerConsumer QoS controls the maximum size of this queue, in the same way that MaxQueueLength sets the maximum length of the channel queue. The major use of the MaxEventsPerConsumer setting is to prevent a consumer which is consuming events very slowly, from backing up the master queue. Using this will make sure that in these circumstances the throughput will not decrease.


#KnowledgeDocs
#OpenFusion
#notificationservice