MQ Salesforce Bridge is a feature that was introduced in MQ v9.0.2 (March 2017). This allows Salesforce platform events to be synchronized to a queue in the MQ queue manager. This provides a very easy and convenient way for enterprise applications to receive events from Salesforce, without needing to integrate with the Salesforce platform. These enterprise applications can use a wide variety of MQ client libraries to get these messages from an MQ queue. Unfortunately, IBM announced in MQ v9.3.1 (November 2022) that the MQ Salesforce Bridge feature was deprecated. The recommended solution to replace this solution is IBM App Connect.
This article shows a sample of how to use App Connect Designer event flow to subscribe to Salesforce platform events and forward these events as messages into an MQ queue. The diagram below shows a high-level overview of the solution.

There are some prerequisites if you want to work on this solution.
- Register for a Salesforce developer account
- Red Hat Openshift (v4.12.x)
- Cloud Pak for Integration installed (v2023.2.1)
- App Connect designer authoring tool installed (v12.0.8)
- App Connect dashboard installed (v12.0.8)
- MQ Queue manager installed (v9.3.3)
Configure connection details to connect to Salesforce via OAuth
The documentation here provides the details on how to configure this in Salesforce. We need to get the following information
- Login URL - follow the instructions in the documentation.
- Username - this is the user name you used to register/login.
- Password - this is the concatenation of your login password and token (password+token) Follow the instructions in the documentation on how to reset the token.
- Client ID - this is the consumer key that is generated when you create a connected app for App Connect in Salesforce.
- Client Secret - this is the consumer secret that is generated when you create a connected app for App Connect in Salesforce.
With the above data, we can now configure the credentials to connect to Salesforce in App Designer.
- Fill up the fields using the data above.

- Once filled, click Connect button to test the connection.
Setup custom platform events and triggers
- Create a new platform event.
- Go to the search bar and type Platform Events, and click on Platform Events.

- Click New Platform Event.

- Populate the following fields and click Save.

- Click on the link MQ Event, then in the MQ Event page, click New button to create Custom Fields & Relationships. In my setup, I have created two new fields Name of data type Text(30) and Phone of data type Text(30). Note that the API Names are MQ_Event__e (customer event), Name__c (custom field) and Phone__c (custom field).

- Create new Apex Trigger to send/publish MQ Event, when Account object is created or updated.
- Search for Account object, and go to Account to setup the Trigger.

- Click on Triggers menu item to go to the menu to create triggers

- Click New button to create a trigger.
- Populate the Apex trigger code as follows

For easier cut/paste, I have provided the Apex Trigger code as follows. The logic is triggered when the Account object is inserted or updated. For each of the Account objects that are inserted/updated, a new MQ_Event__e object is created, with the field Name__c mapped to the Account.Name and the Phone__c field mapped to Account.Phone. These event objects are added to a List and then published to the Event Bus.
trigger MQEventPublish on Account (after insert , after update ) {
If(trigger.isAfter && trigger.isUpdate){
List<MQ_Event__e> publishEvents = new List<MQ_Event__e>();
for(Account a : Trigger.new){
MQ_Event__e eve = new MQ_Event__e();
eve.Name__c = a.Name ;
eve.Phone__c = a.Phone ;
publishEvents.add(eve);
}
if(publishEvents.size()>0){
EventBus.publish(publishEvents);
}
}
If(trigger.isAfter && trigger.isInsert){
List<MQ_Event__e> publishEvents = new List<MQ_Event__e>();
for(Account a : Trigger.new){
MQ_Event__e eve = new MQ_Event__e();
eve.Name__c = a.Name ;
eve.Phone__c = a.Phone ;
publishEvents.add(eve);
}
if(publishEvents.size()>0){
EventBus.publish(publishEvents);
}
}
}
MQ queue manager configuration
This article will not go into details on what the configuration is. I will publish the configmap of the queue manager. For simple setup, I am using the SMALLQMCHL_NOTLS channel for this sample.
apiVersion: v1
kind: ConfigMap
data:
config.mqsc: |-
DEFINE QL(APPQ)
DEFINE CHANNEL(SMALLQMCHL) CHLTYPE(SVRCONN) TRPTYPE(TCP) SSLCAUTH(OPTIONAL) SSLCIPH('ANY_TLS12_OR_HIGHER')
SET CHLAUTH(SMALLQMCHL) TYPE(BLOCKUSER) USERLIST(NOBODY)
DEFINE CHANNEL(SMALLQMCHL_NOTLS) CHLTYPE(SVRCONN) TRPTYPE(TCP)
SET CHLAUTH(SMALLQMCHL_NOTLS) TYPE(BLOCKUSER) USERLIST(NOBODY)
REFRESH SECURITY TYPE(CONNAUTH)
Configure connection details to connect to MQ Queue manager in App Designer
- To connect to MQ queue manager without TLS (BASIC), you need to provide the following:
- Queue manager name: e.g. SMALLQM
- Queue manager hostname: This is the service host name
- Listener port number: This is the listener port of the server
- Username (optional): (no used in my case)
- API key/Password (optional): (no used in my case)
- Channel Name: SMALLQMCHL_NOTLS
Once filled, click Connect button to test the connection.
Note: Assuming MQ queue maanger and the integration server is running on the same OpenShift cluster, we can access the queue manager via its defined Service. To find the service name, via OpenShift Console, go to the Services in the namespace (mq) the queue manager is running on. My setup shows the service host name is smallqm-ibm-mq.mq.svc.cluster.local and the port is 1414.
Configure event-driven flow in App Designer
- In the App Connect Designer UI, click on the tile Create an event-driven flow.

- Find Salesforce connector, select the Account 1 (you defined in previous step) and click Configure more events to discover the platform event you are defined in Salesforce.

- Search for MQ Event (Platform event) and select New mq events.

- Once you selected, the Input Connector is added to the flow. You can specific -1 as Replay ID (see here).

- Then click on the second + button.
- Find MQ connector, select Account 1 (you defined in previous step) and select Put message on a queue.

- Specify the Queue name (e.g. APPQ), Message type (as TEXT) and Message payload as concatenating the Name and Phone.

- Finally, give you flow a name (e.g. SalesforceBridge).

Test event-driven flow in App Connect Designer
- Before you deploy to the integration server, you can do unit testing - click Start flow button.

- Then, create a new Account or update an existing Account in Salesforce.
- Check that the messages are delivered in the APPQ queue in MQ Console.

Deploy event-driven flow in App Connect Integration Server
- Export a BAR file, by clicking the Export... menu item.

- Go to App Connect Integration Dashboard and click on Deploy integrations + button.
- Select Medium integration and click Next.
- Upload the SalesforceBridge.bar file you just exported, and click Next.
- Click Create configuration and add two Accounts - one for Salesforce connection, another for MQ connection. You use the same connection information you used previously. When completed, click Next.
- Populate the following fields and click Create button.
- Name: salesforce-bridge
- Channel or version: 12.0
- License: L-MJTK-WUU8HE
- License use: CloudPakForIntegrationNonProductionFREE
- Replicas: 1
- Designer flow mode: local
- Designer flow type: event-drive-or-api
- When successful, you will see the the salesforce-bridge integration server started.

I have uploaded the project artifacts into this Git repository.
References
- IBM Documentation - How to use IBM App Connect with Salesforce (here)
- Salesforce - Streaming API Developer Guide (here)
- How To Publish Platform Events (here)
- Publishing Platform Events from Apex (here)
- Platform Events And Examples How to create in Salesforce (here)
- Subscribe to Salesforce Platform Events (here)
- Workbench Developer Force (here)
- How To Subscribe To Salesforce Push Topic From Workbench? (here)