> Anyone has example of configuring Artemis using JGroups? An example is available here [1], although that example uses the file ping mechanism rather than TCP.
I just set up a cluster of 2 brokers running on my local machine using the following JGroup configs: Node A: <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:org:jgroups" xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd"> <!--include file="${transport-config:tcp-default.xml}" /--> <TCP bind_addr="127.0.0.1" bind_port="7801" recv_buf_size="0" send_buf_size="0" buffered_input_stream_size="65536" buffered_output_stream_size="65536" sock_conn_timeout="300ms" tcp_nodelay="${tcp-nodelay:false}" bundler_type="${jgroups.bundler.type:pd}" bundler.max_size="${jgroups.bundler.max_size:64K}" diag.enabled="true" diag.enable_tcp="true" thread_pool.min_threads="${jgroups.thread_pool.min_threads:0}" thread_pool.max_threads="${jgroups.thread_pool.max_threads:200}" thread_pool.keep_alive_time="60s" use_virtual_threads="${vthreads:true}"/> <TCPPING async_discovery="true" initial_hosts="${jgroups.tcpping.initial_hosts:127.0.0.1[7800]}" return_entire_cache="${jgroups.tcpping.return_entire_cache:false}" port_range="${jgroups.tcp.port_range:0}"/> <MERGE3 min_interval="10s" max_interval="30s"/> <FD_SOCK2/> <FD_ALL3 timeout="40s" interval="5s" /> <VERIFY_SUSPECT2 timeout="1.5s" /> <BARRIER /> <pbcast.NAKACK2 use_mcast_xmit="false" /> <UNICAST3 /> <pbcast.STABLE desired_avg_gossip="50s" max_bytes="4M"/> <pbcast.GMS print_local_addr="true" join_timeout="2s"/> <MFC max_credits="10M" min_threshold="0.4"/> <UFC max_credits="10M" min_threshold="0.4"/> <FRAG2 frag_size="60K" /> <!--RSVP resend_interval="2s" timeout="10s"/--> <pbcast.STATE_TRANSFER/> </config> Node B: <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:org:jgroups" xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd"> <TCP bind_addr="127.0.0.1" bind_port="7800" recv_buf_size="0" send_buf_size="0" buffered_input_stream_size="65536" buffered_output_stream_size="65536" sock_conn_timeout="300ms" tcp_nodelay="${tcp-nodelay:false}" bundler_type="${jgroups.bundler.type:pd}" bundler.max_size="${jgroups.bundler.max_size:64K}" diag.enabled="true" diag.enable_tcp="true" thread_pool.min_threads="${jgroups.thread_pool.min_threads:0}" thread_pool.max_threads="${jgroups.thread_pool.max_threads:200}" thread_pool.keep_alive_time="60s" use_virtual_threads="${vthreads:true}"/> <TCPPING async_discovery="true" initial_hosts="${jgroups.tcpping.initial_hosts:127.0.0.1[7801]}" return_entire_cache="${jgroups.tcpping.return_entire_cache:false}" port_range="${jgroups.tcp.port_range:0}"/> <MERGE3 min_interval="10s" max_interval="30s"/> <FD_SOCK2/> <FD_ALL3 timeout="40s" interval="5s" /> <VERIFY_SUSPECT2 timeout="1.5s" /> <BARRIER /> <pbcast.NAKACK2 use_mcast_xmit="false" /> <UNICAST3 /> <pbcast.STABLE desired_avg_gossip="50s" max_bytes="4M"/> <pbcast.GMS print_local_addr="true" join_timeout="2s"/> <MFC max_credits="10M" min_threshold="0.4"/> <UFC max_credits="10M" min_threshold="0.4"/> <FRAG2 frag_size="60K" /> <!--RSVP resend_interval="2s" timeout="10s"/--> <pbcast.STATE_TRANSFER/> </config> For reference, I adapted these configs from those I found in the JGroups project [2]. Hope that helps! Justin [1] https://github.com/apache/activemq-artemis-examples/tree/main/examples/features/clustered/clustered-jgroups [2] https://github.com/belaban/JGroups/blob/master/conf/tcp.xml On Mon, Sep 29, 2025 at 12:38 PM Gunawan, Rahman (GSFC-SEWP)[Halvik Corp] <[email protected]> wrote: > Hi, > > I’m using Artemis version 2.42.0. Anyone has example of configuring > Artemis using JGroups? My primary can’t see the backup server. > > Attached is part of my broker.xml and jgroups-tcp.xml > > > > > > *Rahman Gunawan* > > *SITSS Software Developer* > > NASA SEWP / SITSS > > HALV*I*K Corporation > > 7601 Ora Glen Dr, Greenbelt, MD 20770 > > C: 240.444.6003 > O: 301.614.5257 > > [email protected] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > For further information, visit: https://activemq.apache.org/contact >
