<!--

    Copyright (c) 2012-2021 Red Hat, Inc.
    This program and the accompanying materials are made
    available under the terms of the Eclipse Public License 2.0
    which is available at https://www.eclipse.org/legal/epl-2.0/

    SPDX-License-Identifier: EPL-2.0

    Contributors:
      Red Hat, Inc. - initial API and implementation

-->
<config xmlns="urn:org:jgroups"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.1.xsd">
  <TCP
    bind_addr="match-interface:eth0"
    bind_port="${TCP_PORT:7800}"
    recv_buf_size="5M"
    send_buf_size="1M"
    max_bundle_size="64K"
    enable_diagnostics="true"
    log_discard_msgs="false"
    thread_naming_pattern="cl"

    thread_pool.min_threads="0"
    thread_pool.max_threads="500"
    thread_pool.keep_alive_time="30000" />

  <org.jgroups.protocols.kubernetes.KUBE_PING
    port_range="3"
    namespace="${KUBERNETES_NAMESPACE:che}"
    labels="${KUBERNETES_LABELS:app=che,component=che}"
    useNotReadyAddresses="${KUBERNETES_USE_NOT_READY_ADDRESSES:false}"
  />

  <MERGE3 min_interval="10000"
    max_interval="30000"/>
  <FD_SOCK/>
  <FD timeout="3000" max_tries="3"/>
  <VERIFY_SUSPECT timeout="1500"/>
  <BARRIER/>
  <pbcast.NAKACK2 use_mcast_xmit="false"
    discard_delivered_msgs="true"/>
  <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
    max_bytes="4M"/>
  <pbcast.GMS print_local_addr="true" join_timeout="3000" />
  <MFC max_credits="2M"
    min_threshold="0.4"/>
  <FRAG2 frag_size="60K"/>
  <pbcast.STATE_TRANSFER/>
  <CENTRAL_LOCK />
</config>
