Flow Limit

Engine-Level Flow Limit

Flow limiting throttles the engine to prevent incoming requests from overwhelming performance. It manages CPU and memory by controlling how many events can queue before pausing triggers.

How it Works: When incoming requests exceed the FLOGO_RUNNER_QUEUE_SIZE limit, the engine pauses the trigger from accepting new requests while continuing to process existing ones. The trigger resumes once all queued requests are complete.

Flow limit is not enforced unless the FLOGO_FLOW_CONTROL_EVENTS variable is set to true as a user-defined engine environment variable.

Key Configuration Variables

Variable Default Description
FLOGO_RUNNER_QUEUE_SIZE 50 Maximum queued events from all triggers.
FLOGO_RUNNER_WORKERS 5 Maximum concurrent events processed from the queue
FLOGO_FLOW_CONTROL_EVENTS

N/A

Set to true to enable flow limiting

Supported Connectors

The following connectors support the engine-level Flow limit feature:

  • TIBCO Flogo® Connector for Apache Kafka

  • TIBCO Flogo® Connector for Apache Pulsar

  • TIBCO Flogo® Connector for TIBCO eFTL™

Note: It is not a best practice to use a combination of triggers where some support flow limiting and others do not within the same Flogo application. When triggers that do not support flow limiting are used alongside triggers that do, the unsupported triggers continue to accept incoming requests without being paused by the engine, bypassing the flow control mechanism. This might lead to unpredictable behavior, resource exhaustion, and can negate the benefits of flow limiting. If flow limiting is required, ensure all triggers in the application support this feature.

Example: Engine-Level Flow Limit with eFTL Message Subscriber Trigger

Consider a Flogo application with an eFTL Message Subscriber Trigger that receives messages from a TIBCO eFTL destination. When flow limiting is enabled, the engine controls the rate at which incoming messages are processed. For this example, the configuration variables are set to the following values:

FLOGO_FLOW_CONTROL_EVENTS=true

FLOGO_RUNNER_QUEUE_SIZE=50

FLOGO_RUNNER_WORKERS=5

The following behavior is recorded:

  1. The engine starts and the eFTL Message Subscriber Trigger begins accepting messages.

  2. Up to 5 messages are processed concurrently (controlled by FLOGO_RUNNER_WORKERS).

  3. Additional incoming messages are queued, up to a maximum of 50 (controlled by FLOGO_RUNNER_QUEUE_SIZE).

  4. Once the queue is full (50 messages queued), the engine pauses the eFTL Message Subscriber Trigger. It stops consuming new messages.

  5. The engine continues processing the queued and in-progress messages.

  6. Once all queued messages are processed, the trigger resumes and begins accepting messages again.

Note:
  • The Flow limit applies to all triggers collectively through the queue size setting.

  • Not all connectors support this functionality—refer to the previously given supported connectors list.

  • Trigger-Level Flow Limit

    Some connectors also support a trigger-level Flow limit, which is configured directly on the trigger rather than at the engine level. For example, the TCM (eFTL) Message Subscriber trigger provides trigger-level Flow limit settings that allow you to enable flow limiting and control the maximum number of messages processed concurrently when the processing mode is set to Async. For details on trigger-level Flow limit configuration and behavior, refer to the connector documentation.

    Note: It is not a best practice to enable both engine-level and trigger-level flow limiting simultaneously. If both are configured, the engine-level Flow limit takes precedence. The engine-level flow limiting can be used for global Flow limit across all triggers, and trigger-level flow limiting for Flow limit on a specific trigger.
    Note: All the connectors supporting the trigger-level functionality are mentioned in the TIBCO Flogo® Connectors User Guide.

    Supported Connectors

    The following connectors support the trigger-level Flow limit feature:

    • TIBCO Flogo® Connector for TIBCO Enterprise Message Service™

    • TIBCO Flogo Connector for TIBCO eFTL™

    • TIBCO Flogo® Connector for TIBCO FTL®

    • TIBCO Flogo® Connector for Apache Pulsar