Performance: Publisher Send Policy

This section is only applicable when the publisher send mode is “store_confirm_send”. For more information, see Performance: Publisher Send Mode.

By default, the producer blocks in the send call until it receives a confirmation from FTL server that the message has been stored. There are two basic types of send call:

  • Send a single message: The producer waits for confirmation of each message. This is the simplest application to write.

  • Send a batch of messages: The messages are sent to FTL server, and FTL server confirms them as a batch. This reduces per-message latency, since in general only one round trip to FTL server is required.

If you do not want to complicate your application code with batched sends, but you want the performance benefit of batched sends, your application code can configure the publisher object for non-inline sends. When non-inline send is enabled:

  • The send call queues the message to be sent to FTL server in the background, and then returns. Generally, the call returns before receiving confirmation from FTL server.

  • In the background, the FTL library collects messages and sends them to FTL server in batches. The messages are released when confirmation from FTL server arrives.

  • Your code can specify a limit on the number of messages waiting for confirmation. Once that limit is reached, the send call is blocked.

In the event of network disruption or other failures, when non-inline send is enabled, FTL retries the send in the background until it succeeds. If the message cannot be sent for some reason, the next send call raises an exception. The limit on the number of messages waiting for confirmation is the upper bound on how many messages were lost.

For more information, see Performance: Publisher Send Mode and Performance: Publisher Send Policy. You can enable non-inline send globally for all applications (see Realm Properties Details Panel), or for a specific publisher object (in C API, TIB_PUBLISHER_PROPERTY_INT_SEND_POLICY). For more information, see Publisher Mode and Send Policy.