Skip to main content
This section introduces how to develop and pacakge Java Pulsar functions to use on StreamNative cloud.

Develop

StreamNative supports all features for the Java functions, please refer to: Develop Functions to learn how to develop a Java Function.

Package

Please refer to: Pacakge Java Functions

Deploy

After creating a cluster, set up your environment and develop&package your function, you can use the snctl, pulsarctl, pulsar-admin command, the REST API, or terraform to deploy a Pulsar function to your cluster. You can create a java Pulsar function by using a local JAR/NAR package or an uploaded Pulsar functions package(recommend).

(Optional) Upload your function file to Pulsar

It’s recommended to upload your function file to Pulsar before you create a function. Since you can add a version suffix to the package.
Upload packages
You should see the following output:

Create

You need to package your Java function as a .jar or .nar file (and upload it to Pulsar) first.
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 the --sn-service-account flag.You can use --as-service-account instead of --sn-service-account if you are using other versions of Pulsar clusters.
You should see something like this:
For details about Pulsar function configurations, see Pulsar function configurations.

What’s next?