SK SKYVVA Documentation

3. How to use Agent Pulsar adapter for Producer?

Learning Objectives:- This unit describes:-

Introduction:

In this tutorial, we will learn how the Agent Pulsar adapter works for Producers. In simple words, an Agent pulsar adapter for Producer means Outbound Pulsar Adapter. We need an Outbound Pulsar Adapter when we want to send data out from salesforce, here We need to create a topic first. From salesforce, we can send data messages to the API endpoint of our agent, and then we have a camel producer to publish into the topic invoice, which is on the Kafka side. This is the outbound process because we are sending data out here, It plays the role of Producer. So now we are going to check the use cases for Outbound Pulsar Adapter i.e, for Producer. To configure, firstly we need to learn and follow some steps: 1.How to configure a new agent control board.

CASE 1: Use Case for file type CSV

2. Create an Adapter:

3. Configure Interface page:

5. Do Mapping:

6. Callout: [aux_code language="javascript" theme="tomorrow" title="" extra_classes=""] skyvvasolutions.CallOutControl c = new skyvvasolutions.CallOutControl(); c.returnJSONComplete=true; c.actionDoIntegrate=true; c.isCreateMessage=true; String[] ids= new String[]{'0016E00001CHaYWQA1','0016E00001CHaYXQA1'}; //Account Record Ids List result = skyvvasolutions.Iservices.invokeCalloutV3('Agent_Pulsar_Adapter','Pulsar_CSV_Outbound',ids,'SYNC',c); [/aux_code]

7. Callout to pulsar server: [aux_code language="javascript" theme="tomorrow" title="" extra_classes=""] Command :( You need to execute below command on ec2 new agent-tools-server command prompt). pulsar-client consume -n 0 -s test non-persistent://vip/skyvva/OutboundCSVTopic Separator: Comma ( , ) OR Semi Colon ( ; ) OR Tab ( Tab ) OR Pipe ( | ) [/aux_code]

8. Message Monitoring:

CASE 2: Use Case for file type XML

2. Create an Adapter:

3. Configure Interface page:

5. Do Mapping:

6. Callout: [aux_code language="javascript" theme="tomorrow" title="" extra_classes=""] skyvvasolutions.CallOutControl c = new skyvvasolutions.CallOutControl(); c.returnJSONComplete=true; c.actionDoIntegrate=true; c.isCreateMessage=true; String[] ids= new String[]{'0016E00001CHaYWQA1','0016E00001CHaYXQA1'};//Account Record Ids List result = skyvvasolutions.Iservices.invokeCalloutV3('Agent_Pulsar_Adapter','Pulsar_JSON_Outbound',ids,'SYNC',c); [/aux_code]

7. Callout to pulsar server: [aux_code language="javascript" theme="tomorrow" title="" extra_classes=""] Command :( You need to execute below command on ec2 new agent-tools-server command prompt). pulsar-client consume -n 0 -s test non-persistent://vip/skyvva/OutboundXMLTopic [/aux_code]

8. Message Monitoring:

Open this article in the interactive viewer →