The following diagram illustrates the deployment of function workers running along with brokers.
Service URLs in the illustration represent Pulsar service URLs that Pulsar client and Pulsar admin use to connect to a Pulsar cluster.
To set up function workers to run with brokers, complete the following steps:
Enable function workers to run with brokers
conf/broker.conf file, set
Configure function workers to run with brokers
run-with-brokers mode, most settings of function workers are inherited from your broker configuration (for example, configuration store settings, authentication settings, and so on). You can customize other worker settings by configuring the
conf/functions_worker.yml file based on your needs.
- To ensure high availability in a production deployment (a cluster with multiple brokers), set
numFunctionPackageReplicasto equal the number of bookies. The default value
1is only for one-node cluster deployment.
- To initialize distributed log metadata in runtime (
true), ensure that it has been initialized by the
When authentication is enabled on the BookKeeper cluster, you need to configure the following authentication settings for your function workers.
bookkeeperClientAuthenticationPlugin: the authentication plugin name of BookKeeper client.
bookkeeperClientAuthenticationParametersName: the authentication plugin parameters of BookKeeper client, including names and values.
bookkeeperClientAuthenticationParameters: the authentication plugin parameters of BookKeeper client.
Start function workers to run with brokers
Once function workers are configured properly, you can start the brokers (function workers are running with the brokers).
To verify whether each worker is running or not, you can use the following command.
If a list of active function workers is returned, it means they have been started successfully. The output is similar to the following.