Contact Us 1-800-596-4880

Salesforce Pub/Sub Connector 1.0 Reference

Anypoint Connector for Salesforce Pub/Sub (Salesforce Pub/Sub Connector) enables you to connect to the Pub/Sub API, which provides a single interface for publishing and subscribing to platform events, including real-time event monitoring events and change data capture events.

Configuration

Default Configuration for Salesforce Pub/Sub Connector.

Name Type Description Default Value Required

Name

String

Name for this configuration. Connectors reference the configuration with this name.

x

Connection

Connection types for this configuration.

x

Name

String

ID used to reference this configuration.

x

Expiration Policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.

Basic Authentication Connection Type

Uses a username and a password for authentication.

Name Type Description Default Value Required

Connection Timeout

Number

How long the connector waits before timing out when establishing a connection to the remote service. Values less than one millisecond are converted to 0.

0

Time unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Timeout field.

SECONDS

Login Request Timeout

Number

How long the client waits to receive the answer for the login request before timing out. Values less than one millisecond are converted to 0.

0

Login Request Time unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Login Request Timeout field.

SECONDS

Proxy configuration

Configures a proxy for outbound connections. The requests to the gRPC API (towards the gRPC host and gRPC port) are proxied through the proxy server configured using this field.

Username

String

Username used to initialize the session.

x

Password

String

Password used to authenticate the user.

x

Security Token

String

User’s security token. The security token can be omitted if your IP has been added to the allowlist on Salesforce.

Authorization URL

String

Web service URL responsible for user authentication. The URL for the endpoint that is configured to handle SOAP authentication requests.

TLS configuration

TLS

Configures TLS. If using the HTTPS protocol, you must configure TLS.

gRPC host

String

Host in which the proxy requests are sent to the gRPC API (towards the gRPC host). The proxy requests to the gRPC host go through the proxy.

api.pubsub.salesforce.com

gRPC port

Number

Port in which the proxy requests are sent to the gRPC API (towards the gRPC port). The proxy requests to the gRPC port go through the proxy.

7443

Reconnection

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

OAuth v2.0 Connection Type

Use OAuth 2.0 to delegate user authentication to the service hosting the user account. For more information, refer to Configuring OAuth 2.0 for Connectors or Configuring OAuth 2.0 for Connectors on CloudHub.

Name Type Description Default Value Required

Connection Timeout

Number

How long the connector waits before timing out when establishing a connection to the remote service. Values less than one millisecond are converted to 0.

0

Time unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Timeout field.

SECONDS

Login Request Timeout

Number

How long the client waits to receive the answer for the login request before timing out. Values less than one millisecond are converted to 0.

0

Login Request Time unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Login Request Timeout field.

SECONDS

Proxy configuration

Configures a proxy for outbound connections. The requests to the gRPC API (towards the gRPC host and gRPC port) are proxied through the proxy server configured using this field.

Api Version

Number

API version used. Defaults to the latest API version supported by the connector.

TLS configuration

TLS

Configures TLS. If using the HTTPS protocol, you must configure TLS.

gRPC host

String

Host in which the proxy requests are sent to the gRPC API (towards the gRPC host). The proxy requests to the gRPC host go through the proxy.

api.pubsub.salesforce.com

gRPC port

Number

Port in which the proxy requests are sent to the gRPC API (towards the gRPC port). The proxy requests to the gRPC port go through the proxy.

7443

Reconnection

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

Consumer Key

String

OAuth consumer key, as registered with the service provider.

x

Consumer Secret

String

OAuth consumer secret, as registered with the service provider.

x

Authorization Url

String

URL of the service provider’s authorization endpoint.

https://login.salesforce.com/services/oauth2/authorize

Access Token Url

String

URL of the service provider’s access token endpoint.

https://login.salesforce.com/services/oauth2/token

Scopes

String

OAuth scopes to request during the OAuth dance. This value defaults to the scopes in the annotation.

Resource Owner Id

String

Resource owner ID to use with the authorization code grant type.

Before

String

Name of the flow to execute immediately before starting the OAuth dance.

After

String

Name of the flow to execute immediately after receiving an access token.

Listener Config

String

Configuration for the HTTP listener that listens for requests on the access token callback endpoint.

x

Callback Path

String

Path of the access token callback endpoint.

x

Authorize Path

String

Path of the local HTTP endpoint that triggers the OAuth dance.

x

External Callback Url

String

URL that the OAuth provider uses to access the callback endpoint if the endpoint is behind a proxy or accessed through an indirect URL.

Object Store

String

Configures the object store that stores data for each resource owner. If not configured, Mule uses the default object store.

OAuth JWT Connection Type

Uses OAuth 2.0 with a JSON Web Token (JWT) request for user authentication.

Name Type Description Default Value Required

Connection Timeout

Number

How long the connector waits before timing out when establishing a connection to the remote service. Values less than one millisecond are converted to 0.

0

Time unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Timeout field.

SECONDS

Login Request Timeout

Number

How long the client waits to receive the answer for the login request before timing out. Values less than one millisecond are converted to 0.

0

Login Request Time unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Login Request Timeout field.

SECONDS

Proxy configuration

Configures a proxy for outbound connections. The requests to the gRPC API (towards the gRPC host and gRPC port) are proxied through the proxy server configured using this field.

Api Version

Number

API version used. Defaults to the latest API version supported by the connector.

Consumer Key

String

Consumer key for the Salesforce connected app.

x

Key Store

String

Path to the keystore used to sign data during authentication.

x

Store Password

String

Password of the keystore.

x

Certificate Alias

String

Alias of the certificate.

Principal

String

Username of the desired Salesforce user to take action on behalf of.

x

Token Endpoint

String

URL pointing to the server responsible for providing the authentication token. According to Salesforce, the Token Endpoint field is https://login.salesforce.com/services/oauth2/token or https://acme.force.com/customers/services/oauth2/token (in which \acme.force.com/customers is your community URL) if implementing for a community.

https://login.salesforce.com/services/oauth2/token

Audience Url

String

Audience identifies the authorization server as an intended audience. The authorization server must verify that the authorization server is an intended audience for the token. Use the authorization server’s URL for the audience value: https://login.salesforce.com, https://test.salesforce.com, or https://community.force.com/customers if implementing for a community.

TLS configuration

TLS

Configures TLS. If using the HTTPS protocol, you must configure TLS.

gRPC host

String

Host in which the proxy requests are sent to the gRPC API (towards the gRPC host). The proxy requests to the gRPC host go through the proxy.

api.pubsub.salesforce.com

gRPC port

Number

Port in which the proxy requests are sent to the gRPC API (towards the gRPC port). The proxy requests to the gRPC port go through the proxy.

7443

Reconnection

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

OAuth Username Password Connection Type

Uses OAuth 2.0 with a username and a password for authentication.

Name Type Description Default Value Required

Connection Timeout

Number

How long the connector waits before timing out when establishing a connection to the remote service. Values less than one millisecond are converted to 0.

0

Time unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Timeout field.

SECONDS

Login Request Timeout

Number

How long the client waits to receive the answer for the login request before timing out. Values less than one millisecond are converted to 0.

0

Login Request Time unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Login Request Timeout field.

SECONDS

Proxy configuration

Configures a proxy for outbound connections. The requests to the gRPC API (towards the gRPC host and gRPC port) are proxied through the proxy server configured using this field.

Api Version

Number

API version used. Defaults to the latest API version supported by the connector.

Consumer Key

String

Consumer key for the Salesforce connected app.

x

Consumer Secret

String

Your application’s client secret (consumer secret in Remote Access Detail).

x

Username

String

Username used to initialize the session.

x

Password

String

Password used to authenticate the user.

x

Security Token

String

User’s security token. The security token can be omitted if your IP has been added to the allowlist on Salesforce.

Token Endpoint

String

URL pointing to the server responsible for providing the authentication token. According to Salesforce, the Token Endpoint field is https://login.salesforce.com/services/oauth2/token or https://acme.force.com/customers/services/oauth2/token (in which \acme.force.com/customers is your community URL) if implementing for a community.

https://login.salesforce.com/services/oauth2/token

TLS configuration

TLS

Configures TLS. If using the HTTPS protocol, you must configure TLS.

gRPC host

String

Host in which the proxy requests are sent to the gRPC API (towards the gRPC host). The proxy requests to the gRPC host go through the proxy.

api.pubsub.salesforce.com

gRPC port

Number

Port in which the proxy requests are sent to the gRPC API (towards the gRPC port). The proxy requests to the gRPC port go through the proxy.

7443

Reconnection

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

OAuth SAML Connection Type

Uses OAuth 2.0 with a signed SAML 2.0 assertion to request an access token.

Name Type Description Default Value Required

Connection Timeout

Number

How long the connector waits before timing out when establishing a connection to the remote service. Values less than one millisecond are converted to 0.

0

Time unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Timeout field.

SECONDS

Login Request Timeout

Number

How long the client waits to receive the answer for the login request before timing out. Values less than one millisecond are converted to 0.

0

Login Request Time unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Login Request Timeout field.

SECONDS

Proxy configuration

Configures a proxy for outbound connections. The requests to the gRPC API (towards the gRPC host and gRPC port) are proxied through the proxy server configured using this field.

Api Version

Number

API version used. Defaults to the latest API version supported by the connector.

Consumer Key

String

Consumer key for the Salesforce connected app.

x

Key Store

String

Path to the keystore used to sign data during authentication.

x

Store Password

String

Password of the keystore.

x

Certificate Alias

String

Alias of the certificate.

Principal

String

Username of the desired Salesforce user to take action on behalf of.

x

Token Endpoint

String

URL pointing to the server responsible for providing the authentication token. According to Salesforce, the Token Endpoint field is https://login.salesforce.com/services/oauth2/token or https://acme.force.com/customers/services/oauth2/token (in which \acme.force.com/customers is your community URL) if implementing for a community.

https://login.salesforce.com/services/oauth2/token

TLS configuration

TLS

Configures TLS. If using the HTTPS protocol, you must configure TLS.

gRPC host

String

Host in which the proxy requests are sent to the gRPC API (towards the gRPC host). The proxy requests to the gRPC host go through the proxy.

api.pubsub.salesforce.com

gRPC port

Number

Port in which the proxy requests are sent to the gRPC API (towards the gRPC port). The proxy requests to the gRPC port go through the proxy.

7443

Reconnection

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

Sources

Subscribe Channel Listener

<salesforce-pub-sub:subscribe-channel-listener>

Subscribes to a streaming channel. This source provides channel-related notification settings for new events that occur after you subscribe.

A channel must be published to Salesforce before a subscription to the channel is created.
Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Channel Name

String

Name of the streaming channel to subscribe to.

x

Replay Option

One of:

  • LATEST

  • EARLIEST

  • CUSTOM

  • REPLAY ID FROM OBJECT STORE

Interface with the following implementations:

  • Latest

    Subscriber receives new events that are broadcast after the client subscribes.

  • Earliest

    Subscriber receives all events, including past events that are within the retention window of the server and new events sent after subscription.

  • Custom replay id

    Subscriber receives only events with a replay ID higher than the specified value.

  • Replay id from object store

    Subscriber receives only events with a replay ID higher than the specified value in object store. If no value is found, it defaults to Earliest. Provide values for the Object Store Name and the Object Store Key fields to connect to the desired object store and retrieve the replay ID value. For more information on how to use Replay id from object store, refer to Store the Replay ID in the Object Store.

x

Batch events size

Number

Total number of events included in a server batch. Lower values indicate small memory footprint with more server calls, while higher values indicate bigger memory footprint with less API calls. A new batch of events is requested by the connector after the flow consumes the existing events. The maximum value is 100.

100

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component.

x

Primary Node Only

Boolean

Determines whether to execute this source on only the primary node when running Mule instances in a cluster.

true

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Redelivery Policy

Defines a policy for processing the redelivery of the same message.

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Any

Attributes Type

Any

Associated Configurations

Operations

Publish Event

<salesforce-pub-sub:publish-event>

Publishes the given list of events to the specified event topic. Only high-volume platform events, including real-time event monitoring events and change data capture events, are allowed.

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Topic

String

Topic for the event you want to publish. The format of the topic is /event/EventName__e. For example, for Order_Event__e, the topic is /event/Order_Event__e.

x

Events

Array of Object

List of events to publish that match the schema of the current topic.

#[payload]

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component.

x

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Array of Object

Associated Configurations

Throws

  • MULE:ANY

  • SALESFORCE-PUB-SUB:CONNECTIVITY

  • SALESFORCE-PUB-SUB:INVALID_INPUT

  • SALESFORCE-PUB-SUB:RETRY_EXHAUSTED

  • SALESFORCE-PUB-SUB:SECURITY

  • SALESFORCE-PUB-SUB:SERVER_ERROR

Unauthorize

<salesforce-pub-sub:unauthorize>

Deletes all the access token information of a given resource owner ID so that it is impossible to execute any operation for that user without doing the authorization dance again.

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Resource Owner Id

String

ID of the resource owner for whom to invalidate access.

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component.

x

Associated Configurations

Object Types

CRL File

Specifies the location of the certification revocation list (CRL) file.

Field Type Description Default Value Required

Path

String

Path to the CRL file.

Custom OCSP Responder

Configures a custom OCSP responder for certification revocation checks.

Field Type Description Default Value Required

Url

String

URL of the OCSP responder.

Cert Alias

String

Alias of the signing certificate for the OCSP response. If specified, the alias must be in the truststore.

Custom Replay Id

Configures a custom replay ID.

Field Type Description Default Value Required

Replay Id

Number

Subscriber receives all events after the event specified by its Replay Id value. The value is ignored if the replay option is set on Earliest, Latest, or Replay id from object store.

x

Expiration Policy

Configures an expiration policy strategy.

Field Type Description Default Value Required

Max Idle Time

Number

Configures the maximum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Max Idle Time field.

Keystore

Configures the keystore for the TLS protocol. The keystore you generate contains a private key and a public certificate.

Field Type Description Default Value Required

Path

String

Path to the keystore. Mule resolves the path relative to the current classpath and file system.

Type

String

Type of keystore.

Alias

String

Alias of the key to use when the keystore contains multiple private keys. By default, Mule uses the first key in the file.

Key Password

String

Password used to protect the private key.

Password

String

Password used to protect the keystore.

Algorithm

String

Encryption algorithm that the keystore uses.

Proxy

Configures a proxy for outbound connections.

Field Type Description Default Value Required

Host

String

Host in which the proxy requests are sent.

x

Port

Number

Port in which the proxy requests are sent.

x

Username

String

Username to authenticate against the proxy.

Password

String

Password to authenticate against the proxy.

Reconnect

Configures a standard reconnection strategy, which specifies how often to reconnect and how many reconnection attempts the connector source or operation can make.

Field Type Description Default Value Required

Frequency

Number

How often to attempt to reconnect, in milliseconds.

Blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

Count

Number

How many reconnection attempts the Mule app can make.

Reconnect Forever

Configures a forever reconnection strategy by which the connector source or operation attempts to reconnect at a specified frequency for as long as the Mule app runs.

Field Type Description Default Value Required

Frequency

Number

How often to attempt to reconnect, in milliseconds.

Blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

Reconnection

Configures a reconnection strategy for an operation.

Field Type Description Default Value Required

Fails Deployment

Boolean

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

Reconnection Strategy

Reconnection strategy to use.

Redelivery Policy

Configures the redelivery policy for executing requests that generate errors. You can add a redelivery policy to any source in a flow.

Field Type Description Default Value Required

Max Redelivery Count

Number

Maximum number of times that a redelivered request can be processed unsuccessfully before returning a REDELIVERY_EXHAUSTED error.

Message Digest Algorithm

String

Secure hashing algorithm to use if the Use Secure Hash field is true. If the payload of the message is a Java object, Mule ignores this value and returns the value that the payload’s hashCode() returned.

Message Identifier

One or more expressions that determine if a message was redelivered. This property can be set only if the Use Secure Hash field is false.

Object Store

ObjectStore

Configures the object store that stores the redelivery counter for each message.

Redelivery Policy Message Identifier

Configures how to identify a redelivered message and how to find out when the message was redelivered.

Field Type Description Default Value Required

Use Secure Hash

Boolean

If true, Mule uses a secure hash algorithm to identify a redelivered message.

Id Expression

String

One or more expressions that determine when a message was redelivered. You can set this property only if the Use Secure Hash field is false.

Repeatable File Store Stream

Configures the repeatable file-store streaming strategy by which Mule keeps a portion of the stream content in memory. If the stream content is larger than the configured buffer size, Mule backs up the buffer’s content to disk and then clears the memory.

Field Type Description Default Value Required

In Memory Size

Number

Maximum amount of memory that the stream can use for data. If the amount of memory exceeds this value, Mule buffers the content to disk. To optimize performance:

  • Configure a larger buffer size to avoid the number of times Mule needs to write the buffer on disk. This increases performance, but it also limits the number of concurrent requests your application can process, because it requires additional memory.

  • Configure a smaller buffer size to decrease memory load at the expense of response time.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

Unit for the In Memory Size field.

Repeatable In Memory Stream

Configures the in-memory streaming strategy by which the request fails if the data exceeds the MAX buffer size. Always run performance tests to find the optimal buffer size for your specific use case.

Field Type Description Default Value Required

Initial Buffer Size

Number

Initial amount of memory to allocate to the data stream. If the streamed data exceeds this value, the buffer expands by Buffer Size Increment, with an upper limit of Max In Memory Size value.

Buffer Size Increment

Number

This is by how much the buffer size expands if it exceeds its initial size. Setting a value of zero or lower means that the buffer should not expand, meaning that a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised when the buffer gets full.

Max Buffer Size

Number

Maximum size of the buffer. If the buffer size exceeds this value, Mule raises a STREAM_MAXIMUM_SIZE_EXCEEDED error. A value of less than or equal to 0 means no limit.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

Unit for the Initial Buffer Size, Buffer Size Increment, and Buffer Unit fields.

Replay Id From Object Store

Configures a replay ID from object store.

Field Type Description Default Value Required

Os Name

String

Name of the object store from where to get the latest replay ID. The value is ignored if the replay option is set on Earliest, Latest, or Custom replay id.

x

Os Key

String

Name of the key that contains the latest replay ID. The value is ignored if the replay option is set on Earliest, Latest, or Custom replay id.

x

Standard Revocation Check

Configures standard revocation checks for TLS certificates.

Field Type Description Default Value Required

Only End Entities

Boolean

Which elements to verify in the certificate chain:

  • true

    Verify only the last element in the certificate chain.

  • false

    Verify all elements in the certificate chain.

Prefer Crls

Boolean

How to check certificate validity:

  • true

    Check the Certification Revocation List (CRL) for certificate validity.

  • false

    Use the Online Certificate Status Protocol (OCSP) to check certificate validity.

No Fallback

Boolean

Whether to use the secondary method to check certificate validity:

  • true

    Use the method that wasn’t specified in the Prefer Crls field (the secondary method) to check certificate validity.

  • false

    Do not use the secondary method to check certificate validity.

Soft Fail

Boolean

What to do if the revocation server can’t be reached or is busy:

  • true

    Avoid verification failure.

  • false

    Allow the verification to fail.

TLS

Configures TLS to provide secure communications for the Mule app.

Field Type Description Default Value Required

Enabled Protocols

String

Comma-separated list of protocols enabled for this context.

Enabled Cipher Suites

String

Comma-separated list of cipher suites enabled for this context.

Trust Store

Configures the TLS truststore.

Key Store

Configures the TLS keystore.

Revocation Check

Configures a revocation checking mechanism.

Truststore

Configures the truststore for TLS.

Field Type Description Default Value Required

Path

String

Path to the truststore. Mule resolves the path relative to the current classpath and file system.

Password

String

Password used to protect the truststore.

Type

String

Type of truststore.

Algorithm

String

Encryption algorithm that the truststore uses.

Insecure

Boolean

If true, Mule stops performing certificate validations. Setting this to true can make connections vulnerable to attacks.

View on GitHub