Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Effect of Time on Cache Queries

While running continuous queries, errors can occur if entity creation and deletion happen in rapid succession.

## Example

Consider a continuous query that is monitoring entities of type `/OrderEvents`. Suppose that `OrderEvents` entities are created, asserted, and consumed, at a fast rate. When an `OrderEvent` entity is asserted, it is also added to the cache. When it is consumed, an `OrderEvent` entity is deleted from the cache. The continuous query receives the creation notification and the deletion notification one after the other.

If there is a long enough delay between the creation and deletion actions and the moment a query agent attempts to process the related notifications, the agent will try to retrieve `OrderEvent` entities that have already been removed from the cache, resulting in runtime errors.

This situation may occur when, for example, a very quick succession of notifications is sent, or the network traffic suffers delays, and so on.

## Query Agent Local Cache

The query agent retains the most recently processed entities in a local cache to avoid frequent network lookups. But in the earlier example, the `OrderEvent` is deleted from the cache even before the create-notification is processed by the query, so the `Orderevent` cannot be copied into the query agent's private cache.

Keep such situations in mind as you design your queries.

Did you find this helpful?

YesNo
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 BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.