OIC/Integration/13 → Integrating Publish and Subscribe Message
--
This is a post on Oracle Integration Cloud, highlighting Publish-Subscribe pattern to publish and subscribe through OIC channel.
(1) Flow: [1.a] Trigger → [1.b] Publish to OIC
[2.a] Subscribe to Message → [2.b] Map → [2.c] Upsert DB
(2) Flow Description: Here we are creating a Pubslish-Subscribe Driven Orchestration flow exposing via REST which can be invoked with employee details. The Publish flow will take the request from REST request, publish the message to channel and from the channel Subscribing flow picks the message and put it in EMP database table using the Database connection already configured.
(3) Steps:
Go to OIC console → Integrations → Create a Publish to OIC integration with your project name.
Go to OIC console → Integrations → Create a Subscribe to OIC integration with your project name.
<empReq xmlns="http://www.rest.db.mult.operation.com">
<empDetails>
<empId>003</empId>
<empName>Pratik</empName>
<designation>Analyst</designation>
</empDetails>
</empReq>
Test with above payload:
DB Table with new record inserted at row 3:
Publish to OIC instance:
Subscribe to OIC instance:
………………………………………………………………………………………………