Open topic with navigation

# Inbound Message Delivery

These six phases define the precise terminology that describes the delivery of an inbound message:

Phases of Inbound Message Delivery
| Phase | Description
--- | --- | ---
1 | Receive | A transport presents a message to a subscriber.
2 | Match | If a subscriber has a content matcher, it filters the message. A matching message advances to the next phase. A message that does not match is discarded.
3 | Distribute | The library adds the message to the event queue associated with the subscriber.
4 | Dispatch | A dispatch call in your program removes messages from the event queue, and invokes the appropriate callback.
5 | Process | Your callback gets data from the message and uses it.
6 | Release | The callback returns, releasing the message and its resources.

## Phases, Pipelines, and Threads

Consider the six delivery phases as two pipelines. Event queues serve as a stopover point between the two pipelines:

- The receive pipeline includes the receive, match, and distribute phases.
- The dispatch pipeline includes the dispatch, process, and release phases.

Specific threads do the work that moves a message through each pipeline. Each thread requires CPU resources to do that work.

- One or more receive threads drive the receive pipeline. Inbound data arrives on a transport’s data source.
  - In the receive phase, receive threads pump messages out of those data sources.
  - In the match phase, receive threads filter messages through the content matcher.
  - In the distribute phase, receive threads place messages on the appropriate event queues.
- One or more dispatch threads drive the dispatch pipeline.
  - In the dispatch phase, dispatch threads pump messages out of event queues.
  - In the process phase, dispatch threads process messages using application callbacks.
  - In the release phase, dispatch threads reclaim message resources.

The functional definition of a dispatch thread is any program thread that calls an event queue’s dispatch method. Your application program determines the number of dispatch threads required to dispatch and process messages from all its event queues in a timely and efficient manner. (Developers: record the number of dispatch threads on each programs’ application coordination form.)

With regular event queues, receive threads are internal to the TIBCO FTL library, and the library determines the number of receive threads. In contrast, with inline event queues, the application’s dispatch thread also serves the functional role of a receive thread, as it combines all six phases into a single pipeline (see Inline Mode).

Both pipelines begin by polling for available messages: the receive phase polls a transport’s data source, and the dispatch phase polls an event queue. For the details of polling, see “Receive Spin Limit” in TIBCO FTL Administration.

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.