PulsarConsumer Activity
PulsarConsumer activity receives messages from the Apache Pulsar broker. The PulsarConsumer activity uses the Apache Pulsar client object to build consumers on the client to subscribe to the topics to receive 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 | Name of the Apache Pulsar connection. | ||||||||||||
| Topic Name | Yes | The name of the topic from where the message is consumed. The Topic Name field has the following formats:
|
||||||||||||
| Receive Mode | No |
The message can be received from the broker in Sync mode only. |
||||||||||||
| Subscription Name | Yes | The name of the subscription. | ||||||||||||
| Subscription Type | No |
The following options are available:
|
||||||||||||
| Auto Acknowledgment | No |
Select the Auto Acknowledgment checkbox to automatically acknowledge a message received by the Pulsar Consumer activity. Clear the Auto Acknowledgment checkbox for client acknowledgment. Note: To send a positive acknowledgment, ensure that the message is confirmed in the client mode using a TIBCO ActiveMatrix BusinessWorks™ Confirm activity. If a message is not acknowledged before the process instance ends, ActiveMatrix BusinessWorks Plug-in for Apache Pulsar sends a negative acknowledgment.
For more information, see the Apache Pulsar documentation. |
||||||||||||
| Dead Letter Topic | Yes |
The Dead Letter Topic field is available only if the Subscription Type is Shared or Key_Shared and the Auto Acknowledgment checkbox is cleared. If the message is negatively acknowledged because of an internal activity fault, then the messages are redirected to the DLQ topic when the maximum delivery count is reached. |
||||||||||||
| Max Delivery Count | Yes | The Max Delivery Count field is available only if the Subscription Type is Shared or Key_Shared and the Auto Acknowledgment checkbox is cleared. The number of times a negatively acknowledged message is redelivered before being rerouted to Dead Letter Topic. | ||||||||||||
| Nack Redelivery Delay | Yes | The Nack Redelivery Delay field is available when the Auto Acknowledgment checkbox is cleared. The delay in seconds after which the message is redelivered when the message is negatively acknowledged. |
Description
On the Description tab, you can add a short description for the PulsarConsumer activity.
Advanced
The Advanced panel contains the following fields:
| Input Item | Module Property? Yes/No | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Sequence Key | No | XPath expression that specifies which processes must run in a sequence. Process instances with sequencing keys that evaluate to the same value are run sequentially in the sequence the process instance was created. | ||||||||||||
| Custom Job Id | No | This field can contain an XPath expression that specifies a custom ID for the process instance. | ||||||||||||
| Message Format | No |
The following options are available for the message format:
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. | ||||||||||||
| Properties | Yes | You can set the name of the client configuration and value for the consumer. |
Conversations
You can use the Conversations tab to initiate or join a conversation.
Conversations receive a message after the creation of the process instance, which is initiated or joined by an activity. This activity can be used to initiate a conversation. Click the Add New Conversation icon
to initiate a conversation. For more information about conversations, see TIBCO ActiveMatrix BusinessWorks™ Application Design.
Output
The following is the output for the activity. The Output tab contains the following fields:
| Output Item | Data Type | Description |
|---|---|---|
|
topic |
String | The name of the topic on which the message has been received. |
| messageId | String | The message id of the message. |
| payload |
|
Payload of the message received. |
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. |