This repository was archived by the owner on Oct 23, 2024. It is now read-only.
add support recreate queue and reconnect to rabbitmq#1381
Open
keycodingyfq wants to merge 5 commits into
Open
Conversation
added 3 commits
May 7, 2024 20:41
…st exhchange auto delete will cause channel closed when invote channel.publish
starwarfan
reviewed
May 8, 2024
| const Q_OPTION = { | ||
| durable: false, | ||
| autoDelete: true, | ||
| durable: true, |
Collaborator
There was a problem hiding this comment.
Why set durable to true?
Contributor
Author
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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