Configuring the IBM MQ Bridge to Salesforce
You can configure IBM® MQ and enter IBM MQ Bridge to Salesforce parameters to create the configuration file and connect Salesforce push topics and platform events to your IBM MQ queue manager.
Before you begin
- You installed the MQSeriesSFBridge package in your IBM MQ installation on an x86-64 Linux® platform.
About this task
This task takes you through the minimal setup that is needed to create the IBM MQ Bridge to Salesforce configuration file and successfully connect to Salesforce and IBM MQ so that you can subscribe to Salesforce push topics and platform events. For more information on the meaning and options for all the parameters, see the runmqsfb command. You must consider your own security requirements and customize the parameters appropriate to your deployment.
To create the configuration for creating event messages for Salesforce platform events, see Creating event messages for Salesforce platform events.
- Subscribing to Salesforce push topics and platform events
When the IBM MQ Bridge to Salesforce establishes connections to both Salesforce and IBM MQ, it creates subscriptions to Salesforce push topics and platform events. The push topic or platform event name that the bridge wants to subscribe to, must be included in the configuration file or added in the command line before the connection is made.
One of the configuration attributes is the root of the IBM MQ topic tree and the events are published beneath this root. The bridge accesses this root and adds the full Salesforce topic name, for example, /MQ/SF/ROOT/topic/EscalatedCases. The monitoring topic and applications that are connecting to IBM MQ might look for push topics under /topic/EscalatedCases and platform events under /event/NewCustomer__e.
The published message contains control information and the data structure that contains the requested data fields. For push topics, the data structure is an sobject and for platform events, the structure is payload. The bridge cannot subscribe to a topic or an event if they are not defined in Salesforce. If the bridge encounters an error when it tries to subscribe to a topic, the bridge stops.
A topic object does not need to be defined in IBM MQ but suitable authorities must exist, based on the closest parent element in the tree. The republished message contains only the relevant data structure from the original message by default. The control information is removed. For platform events, the publication has a payload structure. The Publish control data with the payload configuration option in the Behaviour of bridge program set of configuration parameters enables the republication of the entire message, including the control data. For more information, see Configuration parameters.
- At-most-once
- The bridge does not use the ReplayId for restart. After restart of the bridge, only newly generated push topics and platform events are processed. Applications must be prepared to deal with missing publications. The ReplayId is still tracked by the bridge and hardened to a queue, so the bridge can be restarted with the other quality of service and know the current state.
- At-least-once
- The ReplayId is tracked by the bridge and hardened to a queue. On restart of the bridge, the persisted ReplayId is used to request the starting point for publications from the server. Provided the gap was no more than 24 hours, older publications are sent. The ReplayId for a topic is not hardened on every message. It is written in a persistent message at regular intervals and when the bridge is shut down. Applications must be prepared to see duplicate publications.
The ReplayId is written as a message to a newly defined queue. You must define this queue, SYSTEM.SALESFORCE.SYNCQ, before the bridge is started. If the SYSTEM.SALESFORCE.SYNCQ does not exist, the bridge does not continue, regardless of the quality of service mode. An MQSC script is provided for creating the queue with relevant attributes. The queue must be configured with the DEFSOPT(EXCL) NOSHARE option to ensure that only one instance of the bridge program can update the SYSTEM.SALESFORCE.SYNCQ queue.
To create the configuration for creating event messages for platform events, see Creating event messages for Salesforce platform events.