All docs This doc
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »



Overview

The following operations allow you to work with the messages. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with sending the messages to brokers, see Sample configuration.

OperationDescription
Working with Send the message to brokers Publish the messages to the Kafka brokers

Operation details

This section provides details on the operations.

Publishing the messages to the Kafka brokers

The kafkaproduce-operation operation sends the messages to brokers using the topic

kafkaproduce-operation
<kafka.kafkaproduce-operation>
	<topic>{$ctx:topic}</topic>
</kafka.kafkaproduce-operation>
Sample request

Following is a sample REST/JSON request that can be handled by the kafkaproduce-operation operation.

Sample Request for kafkaproduce-operation
{
	"apiUrl":"https://api.callrail.com",
	"apiKey":"f0d9e966cf19af35db86dde005d3028ae",
	"companyId":"195726064",
	"trackerId":"312892004",
	"perPage":"5",
	"page":"1"
} 

 

Sample configuration

Following is a sample proxy service that illustrates how to connect to CallRail with the init operation and use the listUsersForSessionTrackerCallAlerts operation. The sample request for this proxy can be found in listUsersForSessionTrackerCallAlerts sample request. You can use this sample as a template for using other operations in this category.

Sample Proxy
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="kafka_kafkaproduce-operation"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence onError="faultHandlerSeq">
         <callrail.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <apiKey>{$ctx:apiKey}</apiKey>
         </callrail.init>
         <callrail.listUsersForSessionTrackerCallAlerts>
            <companyId>{$ctx:companyId}</companyId>
            <trackerId>{$ctx:trackerId}</trackerId>
            <perPage>{$ctx:perPage}</perPage>
            <page>{$ctx:page}</page>
         </callrail.listUsersForSessionTrackerCallAlerts>
         <respond/>
      </inSequence>
      <outSequence>
        <send/>
      </outSequence>
   </target>
   <description/>
</proxy>                                

 

 

  • No labels