Thursday, February 25, 2021

#832 OIC Feb 21 Release - OCI Streaming Adapter as Trigger

 This post details how you can now use the OCI Streaming adapter as a Trigger in an Integration. 











So what does this mean? Essentially I can have an integration subscribing to a Stream. Publishing messages to the Stream will cause the Integration to be invoked. The adapter documentation, is, as ever, a good starting point - just click here .

OCI Streaming Adapter as Trigger

Back in November 20 - Only the Invoke role was supported. 












Now, in  February 21 - support for Trigger and Invoke roles












Let's look at this in a bit more detail - 

Here is my Streams instance - 










Now to creating the connection in OIC - 



















So let's look at the fields to be entered -

1. Bootstrap Servers - click on Kafka Connection Settings - 












2. SASL Username is a concatenation of 

tenancy/oracleidentitycloudservice/yourUser/StreamingPoolOCID

This data can be found on the same page -


 






just copy the string after username= in the SASL Connection Strings box.

3. SASL Password - go to the User tab in OCI and generate -














4. Trust Store - do the following - 

download the OCI cert from Chrome - 



Generate a trust store using keytool - 


Now import the .jks into OIC - 



Now back to the Connection definition - upload the .jks -


Test - 


Final Step - Trigger runs via the connectivity agent - In this case, I install the agent on my laptop -



Now to using it in an integration -



Consumer Group - enter whatever you want here e.g. testcg01.

Finally, a simple example f the Trigger in action -

Publish / Consume

The first integration will publish a message to my Stream.
It's called AA-Streaming-Producer -





The REST Trigger has as request an employee - 


PublishMsg is configured as follows - 




Now to the Consumer - 



Sub is configured as follows - 




The only logic is the LOG action - here I log the employee.

I activate both integrations and then test by publishing a message to the Stream.
I then check in OIC - Monitoring


I check out the activity stream - 



 














 










No comments: