Ajuste MsUsuarios: Puerto RabbitMQ
This commit is contained in:
parent
61e26e4578
commit
c2348380a1
@ -7,13 +7,16 @@ namespace MSAdminUsuarios.Models
|
||||
public string HostName { get; set; } = null!;
|
||||
public string UserName { get; set; } = null!;
|
||||
public string Password { get; set; } = null!;
|
||||
public int Port { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
if(Debugger.IsAttached) {
|
||||
if (Debugger.IsAttached)
|
||||
{
|
||||
return ($"HostName: {HostName},\n " +
|
||||
$"UserName: {UserName},\n" +
|
||||
$"Password: {Password}");
|
||||
$"Password: {Password},\n" +
|
||||
$"Port: {Port}");
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
@ -67,7 +67,8 @@ builder.Services.AddSingleton<IConnection>(sp =>
|
||||
{
|
||||
HostName = config.HostName,
|
||||
UserName = config.UserName,
|
||||
Password = config.Password
|
||||
Password = config.Password,
|
||||
Port = config.Port,
|
||||
};
|
||||
return factory.CreateConnection();
|
||||
});
|
||||
@ -125,6 +126,11 @@ app.MapControllers();
|
||||
|
||||
#endregion
|
||||
|
||||
using (var scope = app.Services.CreateScope())
|
||||
{
|
||||
// Inicializar el canal - Crea lo necesario en Rabbit antes de subscribirse
|
||||
var channel = scope.ServiceProvider.GetRequiredService<RabbitMQ.Client.IModel>();
|
||||
}
|
||||
|
||||
// Start and Subscribe to RabbitMQ event
|
||||
RabbitMQService.ListenForIntegrationEvents(projectName, builder);
|
||||
|
@ -20,10 +20,13 @@ namespace MSAdminUsuarios.Utils
|
||||
|
||||
public readonly struct MQueues
|
||||
{
|
||||
public static readonly string medico = "UsuarioMedico";
|
||||
//AdminUsuarios
|
||||
public static readonly string PerfilesPorUsuario = "PerfilesPorUsuario";
|
||||
public static readonly string Usuarios = "Usuarios";
|
||||
|
||||
// Agenda
|
||||
public static readonly string FirmaUsuario = $"{Usuarios}.Firma";
|
||||
public static readonly string medico = "UsuarioMedico";
|
||||
|
||||
}
|
||||
public class MsComunicadoresModel
|
||||
@ -114,6 +117,7 @@ namespace MSAdminUsuarios.Utils
|
||||
HostName = mqConfig.HostName,
|
||||
UserName = mqConfig.UserName,
|
||||
Password = mqConfig.Password,
|
||||
Port = mqConfig.Port
|
||||
};
|
||||
|
||||
IConnection connection = factory.CreateConnection();
|
||||
|
@ -2,10 +2,11 @@
|
||||
"ConnectionStrings": {
|
||||
"ConString": "user id=ADMIN;password=ITTASA2017;data source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=181.204.191.98)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=PROYECTOS)))"
|
||||
},
|
||||
"RabbitMQConfig": {
|
||||
"RabbitMQConfig": {
|
||||
"HostName": "localhost",
|
||||
"UserName": "guest",
|
||||
"Password": "guest"
|
||||
"Password": "guest",
|
||||
"Port": 5672
|
||||
},
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
|
@ -5,7 +5,8 @@
|
||||
"RabbitMQConfig": {
|
||||
"HostName": "localhost",
|
||||
"UserName": "guest",
|
||||
"Password": "guest"
|
||||
"Password": "guest",
|
||||
"Port": 5672
|
||||
},
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
|
Loading…
Reference in New Issue
Block a user