<?xml version="1.0" encoding="UTF-8"?>
<eventPublisher name="HTTP-recommendationEventPublisher"
    processing="enable" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventpublisher">
    <from streamName="org.wso2.apimgt.recommendation.event.stream" version="1.0.0"/>
    <mapping customMapping="disable" type="json"/>
    <to eventAdapterType="http-extended">
        <property name="http.url">{{apim.devportal.recommendations.recommendations_api}}/publishEvents</property>
        {% if apim.devportal.recommendations.oauth_endpoint is defined %}
        <property name="oauth.url">{{apim.devportal.recommendations.oauth_endpoint}}</property>
        {% endif %}
        {% if apim.devportal.recommendations.consumer_key is defined %}
        <property name="oauth.consumer.key">{{apim.devportal.recommendations.consumer_key}}</property>
        <property name="oauth.consumer.secret">{{apim.devportal.recommendations.consumer_secret}}</property>
        {% endif %}
        {% if apim.devportal.recommendations.username is defined %}
        <property name="http.username">{{apim.devportal.recommendations.username}}</property>
        <property name="http.password">{{apim.devportal.recommendations.password}}</property>
        {% endif %}
        <property name="http.client.method">HttpPost</property>
    </to>
</eventPublisher>
