Open topic with navigation

# Structuring Programs

These steps outline the main structural components of most application programs that communicate using TIBCO FTL.

Note: For Go program structure, see Structuring Programs in Go.

Procedure
Task A Initializing TIBCO FTL Objects
1. Create a realm object by connecting to an FTL server. (C programs must first open the top-level ``FTL`` object, and then a realm object.)
Task B Defining Callbacks
2. Define callbacks to process inbound messages.
3. Define callbacks to process advisory messages, as needed.
4. Define callbacks to handle out-of-band notifications.
5. Define callbacks for timer events, timer completion, and queue completion, as needed.
Task C Sending Messages
6. Define methods to construct outbound messages.
7. Instantiate endpoints as publisher objects.
8. Arrange to call the send methods of publishers.

   Programs usually call send methods in the context of a data-generation loop, or in the context of message callbacks, or both. (You can use timer callbacks to implement a data-generation loop.)

Task D Receiving Messages
9. Instantiate endpoints as subscriber objects. (With a durable, supply a name property.)
10. Create event queues, and add each subscriber to an event queue.
11. Start a loop to dispatch event queues.
Task E Recovery and Clean-Up
12. Recover from administrative disable (see Recovery of a Disabled Process Restart versus Reopen the Realm).
13. Exit cleanly (see Clean-Up).

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.