Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

add support recreate queue and reconnect to rabbitmq #1381

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

keycodingyfq
Copy link
Contributor

@keycodingyfq keycodingyfq commented May 7, 2024

1、add support to recreate queue when queue was delete,we can test delete queue in rabbitmq manamgent
2、add support to reconnect to rabbitmq
3、add suppert to rabbitmq has many host or ip,if rabbitmq.host="127.0.0.1,192.168.0.1",amqpClient.js will use all the ip to test which can connect,this fix was for rabbitmq cluster which had no haproxy
4、rewirete use direct or topic by base class MsgSenderReceiver
5、change rabbitmq queue name through purpose
notice: if use this fix in pod env, we must delete the old exchange which had create in rabbitmq,beacuse this fix change the rabbitmq exchange options like autoDelete and durable

yufuqiang added 3 commits May 7, 2024 20:41
…st exhchange auto delete will cause channel closed when invote channel.publish
@keycodingyfq keycodingyfq reopened this May 8, 2024
};

const Q_OPTION = {
durable: false,
autoDelete: true,
durable: true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why set durable to true?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why set durable to true?

we found if set durable=false, when the first leader down and up later become follower, the new leader will sync itself data to the older leader which had become follower,this action might waste many times.
set durable=true might let queue data sync quick.it was suggest by our operation & maintenance engineer

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants