Skip to content

Commit

Permalink
rabbitmq port updated as adjustable.
Browse files Browse the repository at this point in the history
  • Loading branch information
byerlikaya committed Oct 10, 2024
1 parent 5d56f04 commit d07c0f8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ builder.Services.AddRabbitMqClient(Configuration);
"UserName": "",
"Password": "",
"ExchangeName": "",
"VirtualHost": ""
"VirtualHost": "",
"Port": -1
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ private static void CreateServices(
UserName = messageBrokerOptions.Username,
Password = messageBrokerOptions.Password,
VirtualHost = messageBrokerOptions.VirtualHost,
Port = messageBrokerOptions.Port is default(int) ? AmqpTcpEndpoint.UseDefaultPort : messageBrokerOptions.Port,
DispatchConsumersAsync = true,
AutomaticRecoveryEnabled = true,
NetworkRecoveryInterval = TimeSpan.FromSeconds(30),
Expand Down
1 change: 1 addition & 0 deletions src/Basic.RabbitMQ/Options/MessageBrokerOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ public class MessageBrokerOptions
public string Password { get; set; }
public string ExchangeName { get; set; }
public string VirtualHost { get; set; }
public int Port { get; set; }
}

0 comments on commit d07c0f8

Please sign in to comment.