-
Notifications
You must be signed in to change notification settings - Fork 0
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
Switch to wagslane RabbitMQ client #21
base: rabbitmq
Are you sure you want to change the base?
Conversation
rabbitmq.WithConsumerOptionsQueueNoDeclare, | ||
) | ||
if err != nil { | ||
c.log.Error(err, "error creating publisher") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: error creating consumer
) | ||
if err != nil { | ||
c.log.Error(err, "error creating publisher") | ||
return nil, fmt.Errorf("error '%w' creating publisher", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit consumer
if publishMandatory { | ||
options = append(options, rabbitmq.WithPublishOptionsMandatory) | ||
} | ||
if publishImmediate { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will be always false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, just left the option to change this constant later
log logr.Logger | ||
} | ||
|
||
func createRabbitMQConnection(brokerUrl string, log logr.Logger) (ConnectionWrapper, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I presume this accepts multiple hosts in brokerUrl?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if a host goes down will this seamlessly connect to another host?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i do not think it accepts multiple hosts. But i will test the failover to another host via DNS resolution/service health
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how does this client support auto reconnect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the consumer/publisher themselves use a connection from the wagslane client that reconnects if it disconnects
7eb2515
to
305ec27
Compare
Still have some testing to do, but this is compiling, has unit tests that pass, and has worked in simple ad-hoc tests.
wagslane golang RabbitMQ client