<!--
  ~ Copyright 2005-2011 WSO2, Inc. (http://wso2.com)
  ~
  ~ Licensed under the Apache License, Version 2.0 (the License);
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an AS IS BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<dataBridgeConfiguration xmlns:svns="http://org.wso2.securevault/configuration">

    <workerThreads>{{transport.receiver.worker_threads}}</workerThreads>

    <!--Maximum amount of messages that can be queued internally in MB-->
    <maxEventBufferCapacity>10</maxEventBufferCapacity>

    <!-- Queue size; the maximum number of events that can be stored in the queue -->
    <eventBufferSize>2000</eventBufferSize>
    <clientTimeoutMin>{{transport.receiver.session_timeout}}</clientTimeoutMin>

    <keyStoreLocation>${carbon.home}/repository/resources/security/{{transport.receiver.keystore.file_name}}</keyStoreLocation>
    <keyStorePassword>{{transport.receiver.keystore.password}}</keyStorePassword>
    <keyStoreType>{{transport.receiver.keystore.type}}</keyStoreType>
    <keyManagerType>{{transport.receiver.keyManager.type}}</keyManagerType>
    <trustManagerType>{{transport.receiver.trustManager.type}}</trustManagerType>

    <dataReceiver name="Thrift">
        <config name="enable">false</config>
        <config name="tcpPort">7611</config>
        <config name="sslPort">7711</config>
    </dataReceiver>

    <dataReceiver name="Binary">
    {% for configuration_key,configuration_value in transport.binary.receiver.items() %}
      {% if configuration_key == "sslEnabledProtocols" || configuration_key == "ciphers" %}
      <config name="configuration_key">{{configuration_value | join(',')}}</config>
      {%else%}
      <config name="{{configuration_key}}">{{configuration_value}}</config>
      {% endif %}
    {% endfor %}
    </dataReceiver>

</dataBridgeConfiguration>
