{% if broker_xml.address_settings is defined %}
    <!-- Address Settings configuration -->
        <address-settings>
            {% for address_setting in broker_xml.address_settings %}
            <address-setting match="{{ address_setting.match }}">
                {% if address_setting.dead_letter_address is defined %}
                <dead-letter-address>{{ address_setting.dead_letter_address }}</dead-letter-address>
                {% endif %}
                {% if address_setting.expiry_address is defined %}
                <expiry-address>{{ address_setting.expiry_address }}</expiry-address>
                {% endif %}
                {% if address_setting.redelivery_delay is defined %}
                <redelivery-delay>{{ address_setting.redelivery_delay }}</redelivery-delay>
                {% endif %}
                {% if address_setting.redistribution_delay is defined %}
                <redistribution-delay>{{ address_setting.redistribution_delay }}</redistribution-delay>
                {% endif %}
                {% if address_setting.max_size_bytes is defined %}
                <max-size-bytes>{{ address_setting.max_size_bytes }}</max-size-bytes>
                {% endif %}
                {% if address_setting.message_counter_history_day_limit is defined %}
                <message-counter-history-day-limit>{{ address_setting.message_counter_history_day_limit }}</message-counter-history-day-limit>
                {% endif %}
                {% if address_setting.address_full_policy is defined %}
                <address-full-policy>{{ address_setting.address_full_policy }}</address-full-policy>
                {% endif %}
                {% if address_setting.auto_create_queues is defined %}
                <auto-create-queues>{{ mbool(address_setting.auto_create_queues) }}</auto-create-queues>
                {% endif %}
                {% if address_setting.auto_create_addresses  is defined %}
                <auto-create-addresses>{{ mbool(address_setting.auto_create_addresses) }}</auto-create-addresses>
                {% endif %}
                {% if address_setting.auto_create_jms_queues is defined %}
                <auto-create-jms-queues>{{ mbool(address_setting.auto_create_jms_queues) }}</auto-create-jms-queues>
                {% endif %}
                {% if address_setting.auto_create_jms_topics is defined %}
                <auto-create-jms-topics>{{ mbool(address_setting.auto_create_jms_topics) }}</auto-create-jms-topics>
                {% endif %}
                {% if address_setting.max_size_bytes_reject_threshold is defined %}
                <max-size-bytes-reject-threshold>{{ address_setting.max_size_bytes_reject_threshold }}</max-size-bytes-reject-threshold>
                {% endif %}
                {% if address_setting.default_address_routing_type is defined %}
                <default-address-routing-type>{{ address_setting.default_address_routing_type }}</default-address-routing-type>
                {% endif %}
                {% if address_setting.config_delete_addresses is defined %}
                <config-delete-addresses>{{ address_setting.config_delete_addresses }}</config-delete-addresses>
                {% endif %}
                {% if address_setting.expiry_delay is defined %}
                <expiry-delay>{{ address_setting.expiry_delay }}</expiry-delay>
                {% endif %}
                {% if address_setting.last_value_queue is defined %}
                <last-value-queue>{{ mbool(address_setting.last_value_queue) }}</last-value-queue>
                {% endif %}
                {% if address_setting.page_max_cache_size is defined %}
                <page-max-cache-size>{{ address_setting.page_max_cache_size }}</page-max-cache-size>
                {% endif %}
                {% if address_setting.send_to_dla_on_no_route is defined %}
                <send-to-dla-on-no-route>{{ mbool(address_setting.send_to_dla_on_no_route) }}</send-to-dla-on-no-route>
                {% endif %}
                {% if address_setting.slow_consumer_policy is defined %}
                <slow-consumer-policy>{{ address_setting.slow_consumer_policy }}</slow-consumer-policy>
                {% endif %}
                {% if address_setting.auto_delete_jms_topics is defined %}
                <auto-delete-jms-topics>{{ mbool(address_setting.auto_delete_jms_topics) }}</auto-delete-jms-topics>
                {% endif %}
                {% if address_setting.default_max_consumers is defined %}
                <default-max-consumers>{{ address_setting.default_max_consumers }}</default-max-consumers>
                {% endif %}
                {% if address_setting.max_delivery_attempts is defined %}
                <max-delivery-attempts>{{ address_setting.max_delivery_attempts }}</max-delivery-attempts>
                {% endif %}
                {% if address_setting.default_last_value_queue is defined %}
                <default-last-value-queue>{{ mbool(address_setting.default_last_value_queue) }}</default-last-value-queue>
                {% endif %}
                {% if address_setting.auto_delete_addresses is defined %}
                <auto-delete-addresses>{{ mbool(address_setting.auto_delete_addresses) }}</auto-delete-addresses>
                {% endif %}
                {% if address_setting.redelivery_delay_multiplier is defined %}
                <redelivery-delay-multiplier>{{ address_setting.redelivery_delay_multiplier }}</redelivery-delay-multiplier>
                {% endif %}
                {% if address_setting.auto_delete_jms_queues is defined %}
                <auto-delete-jms-queues>{{ mbool(address_setting.auto_delete_jms_queues) }}</auto-delete-jms-queues>
                {% endif %}
                {% if address_setting.max_redelivery_delay is defined %}
                <max-redelivery-delay>{{ address_setting.max_redelivery_delay }}</max-redelivery-delay>
                {% endif %}
                {% if address_setting.default_queue_routing_type is defined %}
                <default-queue-routing-type>{{ address_setting.default_queue_routing_type }}</default-queue-routing-type>
                {% endif %}
                {% if address_setting.slow_consumer_check_period is defined %}
                <slow-consumer-check-period>{{ address_setting.slow_consumer_check_period }}</slow-consumer-check-period>
                {% endif %}
                {% if address_setting.slow_consumer_threshold is defined %}
                <slow-consumer-threshold>{{ address_setting.slow_consumer_threshold }}</slow-consumer-threshold>
                {% endif %}
                {% if address_setting.config_delete_queues is defined %}
                <config-delete-queues>{{ address_setting.config_delete_queues }}</config-delete-queues>
                {% endif %}
                {% if address_setting.management_browse_page_size is defined %}
                <management-browse-page-size>{{ address_setting.management_browse_page_size }}</management-browse-page-size>
                {% endif %}
                {% if address_setting.auto_delete_queues is defined %}
                <auto-delete-queues>{{ mbool(address_setting.auto_delete_queues) }}</auto-delete-queues>
                {% endif %}
                {% if address_setting.default_purge_on_no_consumers is defined %}
                <default-purge-on-no-consumers>{{ mbool(address_setting.default_purge_on_no_consumers) }}</default-purge-on-no-consumers>
                {% endif %}
                {% if address_setting.default_exclusive_queue is defined %}
                <default-exclusive-queue>{{ mbool(address_setting.default_exclusive_queue) }}</default-exclusive-queue>
                {% endif %}
                {% if address_setting.page_size_bytes is defined %}
                <page-size-bytes>{{ address_setting.page_size_bytes }}</page-size-bytes>
                {% endif %}
            </address-setting>
                {% if not loop.last %}

                {% endif %}
            {% endfor %}
        </address-settings>

{% endif %}
