I made a few tests with different client libraries.
- Laptop 12 cores, 32 gb ram
- Two rabbitmq nodes in cluster ( same machine)
- RabbitMQ version 3.7.13 - Erlang 21.2.4
- 64 async threads for each server
- Ubuntu 18.04
curl -i -v -X PUT -H 'Content-Type: application/json' https://vhost:[email protected]/api/parameters/shovel/vhost/my-shovel2 -d '{"value":{"src-protocol": "amqp091","src-uri":"amqp://vhost@/vhost","src-queue":"q1","dest-protocol": "amqp091", "dest-uri": "amqp://vhost@/vhost","dest-queue": "q2"}}' | |
curl -i -v -X DELETE -H 'Content-Type: application/json' https://vhost:[email protected]/api/parameters/shovel/vhost/my-shovel2 |
bash << EOF | |
logpath=("/var/log/rabbitmq/[email protected]") | |
numbervhosts=$(expr $(sudo rabbitmqctl list_vhosts | wc -l) - $num) | |
startnr=$(grep -n "Starting RabbitMQ" $logpath | tail -1 | cut -d : -f 1) # Last RabbitMQ Starting | |
startedvhosts=$(sed -n "$startnr"',$p' $logpath | grep -n "Starting message stores for vhost" | wc -l) | |
awk -v nvh="$numbervhosts" -v svh="$startedvhosts" 'BEGIN{ print int(svh/nvh*100) }' | |
EOF |
venv/ | |
*.txt |
#!/usr/bin/env ruby | |
require 'bunny' | |
require 'dotenv/load' | |
connection = Bunny.new ENV['CLOUDAMQP_URL3'] | |
connection.start | |
channel = connection.create_channel # Declare a channel | |
for i in 1..1 | |
puts "Creating queue #{i}" |
# Minimum Viable Federation | |
#Upstream servers are the servers towards messages are originally published | |
#Downstream servers are where the messages get forwarded to | |
# 1. Two clusters | |
DOWNSTREAM_URL="amqps://tynqsojc:[email protected]/tynqsojc" | |
UPSTREAM_URL="amqps://prksmzye:[email protected]/prksmzye" | |
VHOST=tynqsojc | |
HTTPS_DOWNSTREAM="https://tynqsojc:[email protected]" |
# 1. On serverA Create a queue with 1M messages | |
bin/runjava com.rabbitmq.perf.PerfTest -y0 -p -u "q1" \ | |
-s 1000 --id "q1" -ad false -f persistent \ | |
-h $serverA \ | |
-pmessages 1000000 | |
# 2. On server B trigger the memory alarm. | |
sudo rabbitmqctl set_vm_memory_high_watermark 0 |
2021-10-20 15:15:44.302 [error] <0.1264.0> ** Generic server <0.1264.0> terminating | |
** Last message in was {'$gen_cast',init_shovel} | |
** When Server state == {state,undefined,undefined,undefined,undefined,{<<"/">>,<<"logslogslogs">>},dynamic,#{ack_mode => on_confirm,dest => #{current => {<0.1331.0>,<0.1416.0>,<<"amqps://log-srv.rmq.cloudamqp.com/destvhost">>},dest_exchange => <<"logs.hostname2">>,fields_fun => #Fun<rabbit_shovel_parameters.7.125748776>,module => rabbit_amqp091_shovel,props_fun => #Fun<rabbit_shovel_parameters.8.125748776>,resource_decl => #Fun<rabbit_shovel_parameters.6.125748776>,uris => ["amqps://hostname2:[email protected]/destvhost"]},name => <<"logslogslogs">>,reconnect_delay => 5,shovel_type => dynamic,source => #{current => {<0.1269.0>,<0.1302.0>,<<"amqp://">>},delete_after => never,module => rabbit_amqp091_shovel,prefetch_count => 100,queue => <<"logslogslogs">>,resource_decl => #Fun<rabbit_shovel_parameters.10.125748776>,source_exchange_key => <<>>,uris => ["amqp://" |
require 'amqp-client' | |
require 'dotenv/load' | |
NRM = 1 | |
AMQPURL = ENV.fetch('CLOUDAMQP_URL') | |
conn = AMQP::Client.new(AMQPURL, connection_name:'leftover-connection').connect | |
ch = conn.channel | |
ch.confirm_select |
2022-09-09 19:35:30.047624+00:00 [debug] <0.11717.17> rabbit_stream_coordinator: running action: 'start_writer' for acqokxym_s1_1662752130037252903 on node 'rabbit@test-tall-wheat-goat-01' in epoch 1 | |
2022-09-09 19:35:30.048177+00:00 [info] <0.18479.445> Stream: acqokxym_s1_1662752130037252903 will use /var/lib/rabbitmq/rabbit@test-tall-wheat-goat-01/stream/acqokxym_s1_1662752130037252903 for osiris log data directory | |
2022-09-09 19:35:30.048344+00:00 [info] <0.18478.445> rabbit_stream_coordinator: started writer acqokxym_s1_1662752130037252903 on 'rabbit@test-tall-wheat-goat-01' in 1 | |
2022-09-09 19:35:30.048482+00:00 [debug] <0.18479.445> osiris_log:init/1 stream acqokxym_s1_1662752130037252903 max_segment_size_bytes: 1234, | |
2022-09-09 19:35:30.048482+00:00 [debug] <0.18479.445> max_segment_size_chunks 256000, retention [{max_bytes,1234}] | |
2022-09-09 19:35:30.049105+00:00 [debug] <0.18479.445> osiris_log: open_new_segment acqokxym_s1_1662752130037252903: 00000000000000000000.segment | |
2022-09-09 19:35:30 |