Closed wfurney closed 1 year ago
Ok! The configuration API normally looks like this:
services.AddRebus(
configure => configure
.Transport(t => t.UseRabbitMq(connectionString, "my-input-queue"))
);
How would the ideal API look to support SSL on Amazon?
How about: services.AddRebus( configure => configure .Transport(t => t.UseRabbitMq(connectionString, "my-input-queue", SslSettings)) ); Where SslSettings is a Rebus.RabbitMq.SslSettings object? Or multiple parameters used to build that particular object.
Is it as simple as that?
Btw, until this is made easier, you can always use the CustomizeConnectionFactory
method to do whatever you need to do:
services.AddRebus(
configure => configure
.Transport(t => t.UseRabbitMq(connectionString, "my-queue-name")
.CustomizeConnectionFactory(factory => {
// mutate or completely replace the connection factory here
return factory;
}))
);
I think that not all of the code in the package respects the ssl settings. It looks like maybe they need to be stored in ConnectionManager and used there if they were set. I will investigate the CustomConnectionFactory. Thanks!
I got this working in a fork of the project using an earlier version. I do not currently know enough about Rebus or RabbitMQ to feel comfortable making a PR but I have attached the changes I made.
ConnectionManager.cs.txt RabbitMqConfigurationExtensions.cs.txt
Hey there, thanks for experimenting with this 🙂
I just played around with RabbitMQ over amqps (via CloudAMQP), which seemed to work perfectly simply by passing in the amqps://(....)
connection string.
Could you check out this test case and see what is different in your setup?
Hi,
That looks promising, I will try to run this test against an AWS rabbitmq instance when I get a chance. Initially I was setting up rebus for usage with elsa-workflows. It did not appear to be working against the aws hosted rabbitmq instance which only allows secure connections.
Thanks, Wade
On Tue, Aug 2, 2022 at 2:40 AM Mogens Heller Grabe @.***> wrote:
Hey there, thanks for experimenting with this 🙂
I just played around with RabbitMQ over amqps (via CloudAMQP), which seemed to work perfectly simply by passing in the amqps://(....) connection string.
Could you check out this test case https://github.com/rebus-org/Rebus.RabbitMq/blob/master/Rebus.RabbitMq.Tests/Bugs/VerifyThatItWorksWithAmqps.cs and see what is different in your setup?
— Reply to this email directly, view it on GitHub https://github.com/rebus-org/Rebus.RabbitMq/issues/94#issuecomment-1202257380, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXO7U5EZ4NNSUE74IJ7ZJITVXDUJLANCNFSM5XTBS5UA . You are receiving this because you authored the thread.Message ID: @.***>
--
Wade Furney
Software Engineer
@. @.> | dataskrive.com
846 106th Ave NE, Suite 103 | Bellevue, WA 98004
Hi @12wafu , I assume you figure out some kind of solution to this. Closing the issue for now. Let me know if there's anything I can do 🙂
RabbitMQ on AWS requires ssl.