Salesforce Pub/Sub Source
Provided by: "Apache Software Foundation"
Support Level for this Kamelet is: "Preview"
Receive events from the Salesforce Pub/Sub API.
Configuration Options
The following table summarizes the configuration options available for the salesforce-pubsub-source Kamelet:
| Property | Name | Description | Type | Default | Example |
|---|---|---|---|---|---|
Consumer Key | Required The Salesforce application consumer key. | string | |||
Consumer Secret | Required The Salesforce application consumer secret. | string | |||
Password | Required The Salesforce user password. | string | |||
Topic | Required The Pub/Sub channel to subscribe to. | string | /event/BatchApexErrorEvent | ||
Username | Required The Salesforce username. | string | |||
Batch Size | The number of events requested from the Pub/Sub API in a single fetch. | integer | 100 | ||
Deserialize Type | How to deserialise the received events. This Kamelet defaults to JSON so the body is usable downstream without further decoding; the component’s own default is AVRO, which emits binary. Use POJO together with pojoClass to deserialise into a generated class. Enum values: * AVRO * SPECIFIC_RECORD * GENERIC_RECORD * POJO * JSON | string | JSON | ||
Login URL | The Salesforce instance used to authenticate. | string | |||
POJO Class | The fully qualified class name to deserialise into. Only used when deserializeType is POJO. | string | |||
Replay Id | The replay id to resume from. Only used when replayPreset is CUSTOM. | string | |||
Replay Preset | Where to start reading the channel. LATEST receives only new events, EARLIEST replays from the retention window, CUSTOM starts from replayId. Enum values: * LATEST * EARLIEST * CUSTOM | string | LATEST |
Dependencies
At runtime, the salesforce-pubsub-source Kamelet relies upon the presence of the following dependencies:
-
camel:core
-
camel:salesforce
-
camel:kamelet
Camel JBang usage
Prerequisites
-
You’ve installed JBang.
-
You have executed the following command:
jbang app install camel@apache/camel Supposing you have a file named route.yaml with this content:
- route:
from:
uri: "kamelet:salesforce-pubsub-source"
parameters:
.
.
.
steps:
- to:
uri: "kamelet:log-sink" You can now run it directly through the following command
camel run route.yaml Salesforce Pub/Sub Source Kamelet Description
Which API
This is the gRPC based Pub/Sub API, not the older streaming API that salesforce-source uses. Subscribe to a channel such as /event/MyEvent__e, /topic/MyTopic or /data/AccountChangeEvent.
Deserialization
deserializeType defaults to JSON so the body is usable downstream without further decoding. The component’s own default is AVRO, which emits binary. Use POJO together with pojoClass to deserialise into a generated class.
Runtime Dependency
The Pub/Sub API is gRPC based and needs a protobuf-java new enough for the generated stubs in camel-salesforce. Under Camel JBang an older protobuf is resolved and the route fails to start during class loading:
java.lang.NoClassDefFoundError: com/google/protobuf/RuntimeVersion$RuntimeDomain
Adding protobuf-java as an explicit dependency resolves it.