Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants