Open topic with navigation

# Polling for Data

The TIBCO FTL library polls for available data during two phases of inbound message delivery:

- In the receive phase, it polls to receive data from a transport’s data source.
- In the dispatch phase, it polls to take messages from an event queue.

The paradigm is identical in both polling phases:

1. Determine the time limit for polling, that is, the receive spin limit.
2. Poll for available data.
   - If available, get the data and return it.
   - If not, continue polling until the time limit elapses.
3. When the time limit elapses, block until data becomes available. Blocking relinquishes the CPU resource to do other work.

## Threads and Latency

Polling code operates within a thread.

- If the thread is already executing on a CPU core and polling for data, then when data becomes available, the thread immediately gets the data, without adding latency.
- However, if the thread has blocked, the context switching time until it resumes execution adds to message latency. If it is crucial that your application minimize latency, then consider avoiding this situation by adjusting receive spin limit.

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 FTL® - Enterprise Edition

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