PulsarProducer Activity

The PulsarProducer activity publishes messages to a Pulsar broker. The Pulsar broker processes the messages.

General

The General panel contains the following fields:

Property Module Property? Yes/No Description
Name No The name to be displayed as the label for the shared resource in the process.
Pulsar Connection Yes Pulsar connection details to communicate with the broker.
Topic Name Yes

The topic name to which the message is published. The Topic Name field has the following formats:

  • persistent://public/default/foo

  • non-persistent://public/default/foo

    Note: If persistent://<tenant>/<namespace>/ is not added as a prefix in the topic name, then it sets to the default tenant and namespace.
Send Mode No

The message can only be sent to the brokers using the Sync mode.

Access Mode No

The following access modes are available for producers:

Shared: Multiple producers can publish messages to a topic.
Exclusive: Only one producer can publish messages to a topic.
WaitForExclusive: If a producer already exists, the new producer waits until the producer gets the Exclusive access mode.

For more information, see the Apache Pulsar documentation.

Compression Type No

If the Compression Type field is enabled, the data is compressed by the Pulsar Producer activity. The data is written in compressed format on the server and decompressed by the Pulsar Consumer activity. The default value is None. The following options are available for the compression type:

None
Snappy
LZ4
ZSTD
ZLIB

Description

On the Description tab, you can add a short description for the PulsarProducer activity.

Advanced

The Advanced panel contains the following fields:

Input Item Module Property? Yes/No Description
Message Format No

The following formats are supported for the message format:

None
String
JSON
Avro
Note: For Avro message format only simple schema with record type is supported and for JSON message format only simple schema is supported.
Schema Definition File Yes

Select a schema definition file for the schema type. This is only applicable for the JSON and Avro Schema Message Format.

Note: This field is available only if the Message Format is JSON or Avro.
Properties Yes You can set the name of the client configuration and value for the producer.

Input

The Input tab displays the input schema of the activity as a tree structure. The following table describes the fields on the Input tab of the PulsarProducer activity:

Input Item Data Type/Element Type Description
send.timeout Long An error is reported if a message is not acknowledged by the server before the sendTimeout expires.
topicName String The topic name to which the message is published.
additional properties Complex You can set the name of the client configuration and value for the producer.
key String Provide a key for the properties.
value String Provide a value for the specified key in the properties.
Messages Complex The message to be produced
payload
  • base64Binary for None Message Format

  • String for String, JSON, or Avro Message Format

The message body to be produced.

Output

The following table describes the output elements on the Output tab of the PulsarProducer activity:

Output Item Data Type / Element Type Description

status

Boolean The status of the PulsarProducer activity.
topic String The name of the topic.
messsageId String A string representing the message id.

Fault

The following table describes the error schema elements on the Fault tab of the PulsarProducer activity:

PulsarCreatedProducerOrConsumerException
Field Data Type Description
msg String The error message description returned by the plug-in.
msgCode String The error code returned by the plug-in.
PulsarPluginException
Field Data Type Description
msg String The error message description returned by the plug-in.
msgCode String The error code returned by the plug-in.
PulsarEventSourceFaultException
Field Data Type Description
msg String The error message description returned by the plug-in.
msgCode String The error code returned by the plug-in.