Publish and Subscribe to the Oracle Cloud Infrastructure Streaming Service

Use these recipes to send messages from Oracle Integration to the Oracle Cloud Infrastructure Streaming Service and receive messages from the Oracle Cloud Infrastructure Streaming Service.

Note:

This recipe is available as Oracle Cloud Infrastructure Streaming - Publish and Subscribe in the Integration Store. Oracle provides this recipe as a sample only. The recipe is meant only for guidance, and is not warranted to be error-free. No support is provided for this recipe.

Overview

Recipe Name Description Configuration Required
Oracle Cloud Infrastructure Streaming - Publish

This integration with Oracle Cloud Infrastructure Streaming Service is triggered by a schedule and publishes messages from Oracle Integration to the specified stream pool.

The connection for this integration is the same as that for the recipe Oracle Cloud Infrastructure Streaming - Subscribe.

To use the recipe:

  1. Ensure you have met the prerequisites. See Prerequisites for Creating a Connection.
  2. Configure the connection parameters to point to your Oracle Cloud Infrastructure Streaming Service. For detailed information on how to configure the parameters, see Create a Connection.
    • Bootstrap Server
    • Security Policy: SASL PLAIN Over SSL OSS
    • SASL User Name
    • SASL Password
    • TrustStore
    • Agent Group, if the service is hosted on your premises behind the fire wall
  3. In the integration, edit the schedule definition to specify how often messages are retrieved from Oracle Cloud Infrastructure Streaming Service. For detailed information on how to edit a schedule definition, see Define the Integration Schedule.
  4. Edit the integration and edit the Publish endpoint. Specify the stream and partition to which messages are to be sent and be sure to include a sample of the message structure. The integration has the following sample message structure that you'll need to replace. For details, see Stream and Partition Page and Message Structure Page.
    
    {
       "Id" : “123”,   [ ns2:getFlowId () ]
       "Country":"US",
       "State": "MA" ,
       "County": "Worcester"
     }
  5. Activate the integration. For instructions, see Activate an Integration.
  6. Monitor the integration. You can track the integration and monitor the sent messages in the activity stream. For instructions, see View the Activity Stream.
Oracle Cloud Infrastructure Streaming - Subscribe

This integration with Oracle Cloud Infrastructure Streaming Service is triggered by a schedule and consumes messages from the specified stream pool.

The connection for this integration is the same as that for the recipe Oracle Cloud Infrastructure Streaming - Publish.

To use the recipe:

  1. Ensure you have met the prerequisites. See Prerequisites for Creating a Connection.
  2. Configure the connection parameters to point to your Oracle Cloud Infrastructure Streaming Service. For detailed information on how to configure the parameters, see Create a Connection.
    • Bootstrap Server
    • Security Policy: SASL PLAIN Over SSL OSS
    • SASL User Name
    • SASL Password
    • TrustStore
    • Agent Group, if the service is hosted on your premises behind the fire wall
  3. Edit the schedule definition in the integration to specify how often messages are retrieved from Oracle Cloud Infrastructure Streaming Service. For detailed information on how to edit a schedule definition, see Define the Integration Schedule.
  4. Activate the integration. For instructions, see Activate an Integration.
  5. Monitor the integration. You can track the integration and monitor the consumed messages from the activity stream. For instructions, see View the Activity Stream.
    Here's an example of what the activity stream looks like:
    
    <?xml version="1.0" encoding="UTF-8"?>
    <ConsumeResponse xmlns="http://xmlns.oracle.com/cloud/adapter/ocistreaming/ConsumeFrom_REQUEST/types">
      <MessageOutCollection xmlns="http://xmlns.oracle.com/cloud/adapter/kafka/types" xmlns:NS1="http://xmlns.oracle.com/cloud/adapter/kafka/types" NS1:status="SUCCESS">
         <Message>
    	<headers/>
    	<request-wrapper>
    	  <content xmlns="http://xmlns.oracle.com/cloud/adapter/ocistreaming/ConsumeFrom/types">
    	     <Id>7.2803233E7</Id>	     
                <Country>US</Country>
    	     <State>MA</State>
    	     <county>Worcester</county>
    	  </content>
    	</request-wrapper>
    	<config-parameters>
    	  <partition>0</partition>
    	  <offset>25</offset>
    	</config-parameters>
    	<error-details/>
    	<status>SUCCESS</status>
        </Message>
      </MessageOutCollection>
    </ConsumeResponse>

System and Access Requirements

  • Oracle Integration

  • Oracle Cloud Infrastructure Streaming Service

Install, Configure, and Run the Recipe

For more information and steps to install, configure, and run recipes, see Get Started with Integration Accelerators and Recipes.