<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
  ~ Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
  ~
  ~   WSO2 Inc. licenses this file to you 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.
  -->

<broker>
    <prefix>${ANDES_HOME}</prefix>
    <work>${QPID_WORK}</work>
    <conf>${prefix}</conf>

    <plugin-directory>${ANDES_HOME}/lib/plugins</plugin-directory>
    <cache-directory>${QPID_WORK}/cache</cache-directory>

    <connector>
        <qpidnio>{{qpid.nio}}</qpidnio>
        <protectio>
            <enabled>{{qpid.protectio.enabled}}</enabled>
            <readBufferLimitSize>{{qpid.protectio.read_buffer_limit_size}}</readBufferLimitSize>
            <writeBufferLimitSize>{{qpid.protectio.write_buffer_limit_size}}</writeBufferLimitSize>
        </protectio>
        <transport>{{qpid.transport}}</transport>
        <socketReceiveBuffer>{{qpid.socket_receive_buffer}}</socketReceiveBuffer>
        <socketSendBuffer>{{qpid.socket_send_buffer}}</socketSendBuffer>
    </connector>
    <management>
        <enabled>{{qpid.management.enabled}}</enabled>
        <jmxport>{{qpid.management.jmxport}}</jmxport>
        <ssl>
            <enabled>{{qpid.management.ssl}}</enabled>
            <!-- Update below path to your keystore location, or run the bin/create-example-ssl-stores(.sh|.bat)
                 script from within the etc/ folder to generate an example store with self-signed cert -->
            <keyStorePath>{{qpid.management.keystore_path}}</keyStorePath>
            <keyStorePassword>{{qpid.management.keystore_password}}</keyStorePassword>
        </ssl>
    </management>
    <advanced>
        <filterchain enableExecutorPool="{{qpid.advanced.executor_pool_enabled}}"/>
        <enablePooledAllocator>{{qpid.advanced.pooled_allocator_enabled}}</enablePooledAllocator>
        <enableDirectBuffers>{{qpid.advanced.direct_buffers_enabled}}</enableDirectBuffers>
        <framesize>{{qpid.advanced.framesize}}</framesize>
        <compressBufferOnQueue>{{qpid.advanced.compress_buffer_on_queue}}</compressBufferOnQueue>
        <enableJMSXUserID>{{qpid.advanced.jmsx_user_id}}</enableJMSXUserID>
        <locale>{{qpid.advanced.locale}}</locale>
    </advanced>

    <security>
        <pd-auth-manager>
            <principal-database>
                <class>{{qpid.security.principal_database_class}}</class>
                <!--attributes>
                    <attribute>
                        <name>name</name>
                        <value>carbon-user-store</value>
                    </attribute>
                </attributes-->
                {% if qpid.security.principal_database_attributes is defined %}
                <attributes>
                        {% for attribute in qpid.security.principal_database_attributes %}
        <attribute>
                        <name>{{attribute.name}}</name>
                        <value>{{attribute.value}}</value>
                    </attribute>
        {% endfor %}
                </attributes>
                {% endif %}
            </principal-database>
        </pd-auth-manager>

        <msg-auth>{{qpid.security.msg_auth}}</msg-auth>
    </security>

    <virtualhosts>{{qpid.virtual_hosts}}</virtualhosts>

    <heartbeat>
        <delay>{{qpid.heartbeat.delay}}</delay>
        <timeoutFactor>{{qpid.heartbeat.timeout_factor}}</timeoutFactor>
    </heartbeat>
    <queue>
        <auto_register>{{qpid.queue.auto_register}}</auto_register>
        <!-- Enable this into 'true' will activate the queue message counters and message count of each queue
             wil be displayed in the admin console by default. When this is 'false' message count can be read from
             console on user demand-->
        <viewMessageCounts>{{qpid.queue.view_message_counts}}</viewMessageCounts>
    </queue>

    <status-updates>{{qpid.status_updates}}</status-updates>

</broker>
