Apache Pulsar Consumer Trigger

Apache Pulsar Consumer is a Flogo trigger that receives messages published to the configured topic. Each message triggers a new flow and if the flow is successful the message is acknowledged by removing it from the queue.

Trigger Settings

The Trigger Settings tab has the following fields:

Field Required Description
Pulsar Connection Yes Name of the connection.
Topic Yes

The name of the topic from which the message is consumed.

The Topic field has the following format :persistent://public/default/foo

The first segment is the type of topic. The topic can be persistent or non-persistent. With persistent topics, all the messages are persisted to the disk. The second segment is the name of the domain or a tenant. The third segment is the namespace within the domain and the fourth segment is the name of the individual topic.

Subscription Name Yes The subscription name is used by the broker to combine subscribers belonging to a single application into a logical group for message delivery. Subscriptions can also be used to deliver backlog messages to a consumer that goes offline for a period of time.
Subscription Type Yes The following options are available:
  • Exclusive: In Exclusive mode, only a single consumer is allowed to attach to the subscription. An error occurs if multiple consumers subscribe to a topic by using the same subscription.
  • Shared: In Shared mode, multiple consumers can attach to the same subscription. Messages are delivered in a round robin distribution across consumers, and any given message is delivered to only one consumer.
  • Failover: In Failover mode, multiple consumers can attach to the same subscription.
  • KeyShared: In KeyShared mode, multiple consumers can attach to the same subscription. Messages are delivered in a distribution across consumers and messages with the same key or same ordering key are delivered to only one consumer.
Initial Position Yes On the Initial Position field, select Latest to receive the messages that have been published after the subscriber has been connected. Select Earliest to receive all the stored and new messages.
DLQ Topic No The DLQ Topic is available only if the Subscription Type is Shared. If the flow started by the trigger does not complete successfully, the message is negatively acknowledged. If this happens repeatedly, the message effectively blocks processing by the trigger. This field allows you to relocate messages that cannot be processed to another topic. If the DLQ Topic field is not provided then the dead letter queue (DLQ) processing is not performed.
Note: A delay exists between a negative acknowledgment and reposting the message. So it can take several minutes for a message to arrive on the DLQ.
DLQ Max Deliveries No The number of times a message is negatively acknowledged before being rerouted to the DLQ Topic field.
Message Format Yes The Message Format field controls the format of the output schema. The following options are available:
  • String
  • JSON: If JSON is selected, a text editor is provided on the Output Settings tab to accept a JSON document.

Output Settings

The Output Settings tab has the following fields:

Field Required Description
Message Properties No You can add property value to the properties field presented on the Input schema. Each additional property is presented as a named string to be mapped.
Schema for JSON value No The Schema for JSON value field is only available when the Message Format field on the Triggers Settings tab is JSON. This is a free form text editor that accepts any valid JSON document, which is then presented on the output schema.

Map to Flow Inputs

The Map to Flow Inputs tab has the following fields:

Field Description
payload Either a simple string or a representation of the JSON document provided on the Output Settings tab.
properties An object with a string value for each of the named properties from the Output Settings tab.
topic If the subscriber subscribes to multiple topics, the topic field provides the actual topic on which the message has arrived.
Related concepts