How are JMS events handled by BE if they are not consumed in application code?

How are JMS events handled by BE if they are not consumed in application code?

book

Article ID: KB0076088

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition 5.x

Description

As part of normal implementation we recommend users consume the event after all the rule actions that needed to triggered by the event are executed. But, in some cases users might miss the step of consuming the event or choose to not consume the event. Please refer to resolution below to know how this situation is handled in BE.

Issue/Introduction

How are JMS events handled by BE if they are not consumed in application code?

Environment

All Supported Platforms

Resolution

The event’s object management configuration and TTL determine the way in which the event and acknowledgment is handled. 

Scenario#1:

When Event’s Object Management is configured as “Memory Only” in CDD and Event TTL=-1:

If we do not explicitly consume the event then the event will not be acknowledged and it will stay in the queue. This applies to our default Acknowledge mode (EXPLICIT_CLIENT_ACKNOWLEDGEMENT) when using TIBCO EMS and applies to similar ACK modes from other JMS providers as well. The event will not be delivered again while the engine is running, but if you restart the agent then you will receive the message again as JMS servers persist unacknowledged messages. In multi-engine setup stop one inference agent that handled the event then message will be delivered to other running engines, one of them can pick up the message and process it. If none of engines processing the event consume it then it stays on the queue and has to be deleted manually.

Scenario#2: 

When event’s Object Management is configured as "Cache Only" in CDD and Event TTL=-1

In this case irrespective of the ACK mode configured and whether you called consume event or not after the RTC is finished the event is acknowledged and written to cache and to backing store if it is configured for backing store. The reason for this behavior is here user has option to load the same event from cache or backing store again and reprocess it if needed. 

Scenario#3

When event TTL is 0 

Then whatever the object management event is deleted after the RTC is finished. 

Scenario#4

When event TTL is positive integer (One or higher (>0))

The event expires after the specified time period has elapsed. The TTL timer starts at the end of the action block of the rule or preprocessor function in which the event is first asserted.

Additional Information

consume event, event acknowledgment