Skip to main content

Pulsar function configurations

This table lists all fields available for creating a Pulsar function.

StreamNative Cloud custom runtime options

To facilitate submitting Pulsar functions based on your requirements, Function on Cloud service provides some custom options via custom-runtime-options.
When update functions/sinks/sources with custom runtime options, the original custom runtime options will be replaced by the new ones, so make sure all the wanted fields are passed in the custom runtime options when you do the update.
This table lists all fields available for custom options. You can compose the custom runtime options as a JSON string and pass it to the custom-runtime-options field. For example:
Then pass it to the custom-runtime-options field as follows:
  • Using snctl:
  • Using pulsarctl:

Run a function as a service account

To run a function with a specific StreamNative Cloud service account, set the snServiceAccount custom runtime option. The selected service account becomes the runtime identity for the function. With snctl, use --sn-service-account on functions create or functions update:
You can also use --use-sn-service-account to select the runtime service account interactively. With pulsarctl or pulsar-admin, set the same value in custom-runtime-options:
Only Pulsar 4.0.x clusters running version 4.0.10.6 or later, or Pulsar 4.2.x clusters running version 4.2.1.4 or later, support runtime service account binding for functions.

Trusted Mode Configuration

This feature is available for BYOC Pro clusters only. To enable Trusted Mode:
  1. Submit a support ticket through StreamNative support
  2. StreamNative support team will activate trusted mode for your cluster
  3. Important: Enabling trusted mode requires a broker restart
Enabling trusted mode causes a broker restart, which temporarily interrupts message processing. Plan this activation during a maintenance window.
When trusted mode is enabled, BYOC Pro users can configure additional advanced options through the custom-runtime-options field. These options provide fine-grained control over Kubernetes pod configuration and runtime behavior.
Trusted mode exposes low-level configuration options. Incorrect configuration of these parameters may affect the normal operation of Pulsar functions and IO connectors. Ensure you understand the implications of each setting before applying them to production workloads.

Trusted Mode Configuration Options

Trusted Mode Configuration Example

javaOPTs Restrictions

The following JVM parameters are system-reserved and cannot be overridden in javaOPTs:
  • -Dpulsar.functions.extra.dependencies.dir
  • -Dpulsar.log
  • -Dbk.log
  • -Dpulsar.function.log
  • -Dpulsar.functions.instance.classpath
  • -Djava.io.tmpdir
  • -Xbootclasspath
  • -Dlog4j.configurationFile
  • -XX:InitialRAMPercentage
  • -XX:MaxRAMPercentage
  • -Xmx
  • -Xms
  • -XX:MaxDirectMemorySize
  • agentlib:jdwp
  • -Djava.security.manager
  • -Djava.security.policy
Attempting to override these parameters will result in configuration errors.
Usage with trusted mode configuration: