The Salesforce streaming inbound endpoint allows you to perform various Salesforce streaming data via WSO2 ESB. The Salesforce streaming API receives notifications for changes to Salesforce data that match a Salesforce Object Query Language (SOQL) query you define, in a secure and scalable way. For more information see Salesforce streaming documentation.
Reliable message delivery is only available in Salesforce API version 37.0 and later.
Creating a PushTopic
To use the Salesforce inbound endpoint, you need to first create a PushTopic that contains an SOQL query.
Go to the developer console of your Salesforce account and click on Debug->Open Execute Anonymous Window. Add the following entry in the Enter Apex Code window.
Retrieving the Account information
WSO2 ESB Salesforce inbound endpoint acts as a message consumer. It creates a connection to the Salesforce account, consumes the Salesforce data and injects the data to the ESB sequence.
Now that you have configured the Salesforce streaming inbound endpoint, use the following ESB inbound endpoint configuration to retrieve account details from your Salesforce account.
connection.salesforce.userName: The user name for accessing the Salesforce account.
connection.salesforce.loginEndpoint: The endpoint for the Salesforce account.
connection.salesforce.password: The password provided here is a concatenation of the user password and the security token provided by Salesforce. For information on creating a security token in Salesforce, see https://help.salesforce.com/articleView?id=user_security_token.htm&type=5.
connection.salesforce.salesforceObject: The name of the push topic that is added to the Salesforce account.
connection.salesforce.connectionTimeout: The time to connect to the Salesforce account (default : 20 * 1000 seconds).
connection.salesforce.readTimeout: The time to read the data (110 * 1000 seconds).
connection.salesforce.waitTime: The time to wait when connecting to the client (default : 10 * 1000s).
connection.salesforce.packageName: The event routing bus that implements Bayeux Client.
connection.salesforce.packageVersion: The version of the
connection.salesforce.soapApiVersion: The version of the salesforce soap API.
- If the client receives events, it should reconnect immediately to receive the next set of events. If the reconnection doesn't occur within 40 seconds, the server expires the subscription and the connection closes. The client should reconnect with a handshake and subscribe again.
- If no events are generated while the client is waiting and the server closes the connection, the client should reconnect immediately.