Skip to content

Commit 29ffc80

Browse files
committed
Fix RabbitMQ connection issue
- ampq should be amqp
1 parent 4d469da commit 29ffc80

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Messaging/src/RabbitMQ/Extensions/RabbitServicesExtensions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
33
// See the LICENSE file in the project root for more information.
44

@@ -251,8 +251,8 @@ public static IServiceCollection ConfigureRabbitOptions(this IServiceCollection
251251
if (connectionFactory is not null)
252252
{
253253
var scheme = connectionFactory.Ssl.Enabled
254-
? "ampqs://"
255-
: "ampq://";
254+
? "amqps://"
255+
: "amqp://";
256256

257257
options.Addresses = $"{scheme}{connectionFactory.UserName}:{connectionFactory.Password}@{connectionFactory.HostName}:{connectionFactory.Port}";
258258
options.VirtualHost = connectionFactory.VirtualHost;

src/Messaging/test/RabbitMQ.Test/Extensions/RabbitServiceExtensionsTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ public void ConfigureRabbitOptions_OverrideAddressWithServiceInfo()
540540
Assert.Equal("Dd6O1BPXUHdrmzbP", rabbitOptions.Username);
541541
Assert.Equal("7E1LxXnlH2hhlPVt", rabbitOptions.Password);
542542
Assert.Equal("cf_b4f8d2fa_a3ea_4e3a_a0e8_2cd040790355", rabbitOptions.VirtualHost);
543-
Assert.Equal("ampq://Dd6O1BPXUHdrmzbP:[email protected]:3306", rabbitOptions.Addresses);
543+
Assert.Equal("amqp://Dd6O1BPXUHdrmzbP:[email protected]:3306", rabbitOptions.Addresses);
544544
}
545545

546546
[Fact]

src/Stream/test/StreamBase.Test/StreamsHost/StreamsHostTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public void HostConfiguresRabbitOptions()
6262
Assert.Equal("Dd6O1BPXUHdrmzbP", rabbitOptions.Username);
6363
Assert.Equal("7E1LxXnlH2hhlPVt", rabbitOptions.Password);
6464
Assert.Equal("cf_b4f8d2fa_a3ea_4e3a_a0e8_2cd040790355", rabbitOptions.VirtualHost);
65-
Assert.Equal("ampq://Dd6O1BPXUHdrmzbP:[email protected]:3306", rabbitOptions.Addresses);
65+
Assert.Equal("amqp://Dd6O1BPXUHdrmzbP:[email protected]:3306", rabbitOptions.Addresses);
6666
}
6767
}
6868

0 commit comments

Comments
 (0)