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 HostName { get; set; } = null!;
|
||||||
public string UserName { get; set; } = null!;
|
public string UserName { get; set; } = null!;
|
||||||
public string Password { get; set; } = null!;
|
public string Password { get; set; } = null!;
|
||||||
|
public int Port { get; set; }
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
if(Debugger.IsAttached) {
|
if (Debugger.IsAttached)
|
||||||
|
{
|
||||||
return ($"HostName: {HostName},\n " +
|
return ($"HostName: {HostName},\n " +
|
||||||
$"UserName: {UserName},\n" +
|
$"UserName: {UserName},\n" +
|
||||||
$"Password: {Password}");
|
$"Password: {Password},\n" +
|
||||||
|
$"Port: {Port}");
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,8 @@ builder.Services.AddSingleton<IConnection>(sp =>
|
|||||||
{
|
{
|
||||||
HostName = config.HostName,
|
HostName = config.HostName,
|
||||||
UserName = config.UserName,
|
UserName = config.UserName,
|
||||||
Password = config.Password
|
Password = config.Password,
|
||||||
|
Port = config.Port,
|
||||||
};
|
};
|
||||||
return factory.CreateConnection();
|
return factory.CreateConnection();
|
||||||
});
|
});
|
||||||
@ -125,6 +126,11 @@ app.MapControllers();
|
|||||||
|
|
||||||
#endregion
|
#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
|
// Start and Subscribe to RabbitMQ event
|
||||||
RabbitMQService.ListenForIntegrationEvents(projectName, builder);
|
RabbitMQService.ListenForIntegrationEvents(projectName, builder);
|
||||||
|
@ -20,10 +20,13 @@ namespace MSAdminUsuarios.Utils
|
|||||||
|
|
||||||
public readonly struct MQueues
|
public readonly struct MQueues
|
||||||
{
|
{
|
||||||
public static readonly string medico = "UsuarioMedico";
|
//AdminUsuarios
|
||||||
public static readonly string PerfilesPorUsuario = "PerfilesPorUsuario";
|
public static readonly string PerfilesPorUsuario = "PerfilesPorUsuario";
|
||||||
public static readonly string Usuarios = "Usuarios";
|
public static readonly string Usuarios = "Usuarios";
|
||||||
|
|
||||||
|
// Agenda
|
||||||
public static readonly string FirmaUsuario = $"{Usuarios}.Firma";
|
public static readonly string FirmaUsuario = $"{Usuarios}.Firma";
|
||||||
|
public static readonly string medico = "UsuarioMedico";
|
||||||
|
|
||||||
}
|
}
|
||||||
public class MsComunicadoresModel
|
public class MsComunicadoresModel
|
||||||
@ -114,6 +117,7 @@ namespace MSAdminUsuarios.Utils
|
|||||||
HostName = mqConfig.HostName,
|
HostName = mqConfig.HostName,
|
||||||
UserName = mqConfig.UserName,
|
UserName = mqConfig.UserName,
|
||||||
Password = mqConfig.Password,
|
Password = mqConfig.Password,
|
||||||
|
Port = mqConfig.Port
|
||||||
};
|
};
|
||||||
|
|
||||||
IConnection connection = factory.CreateConnection();
|
IConnection connection = factory.CreateConnection();
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
"ConnectionStrings": {
|
"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)))"
|
"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",
|
"HostName": "localhost",
|
||||||
"UserName": "guest",
|
"UserName": "guest",
|
||||||
"Password": "guest"
|
"Password": "guest",
|
||||||
|
"Port": 5672
|
||||||
},
|
},
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
|
@ -5,7 +5,8 @@
|
|||||||
"RabbitMQConfig": {
|
"RabbitMQConfig": {
|
||||||
"HostName": "localhost",
|
"HostName": "localhost",
|
||||||
"UserName": "guest",
|
"UserName": "guest",
|
||||||
"Password": "guest"
|
"Password": "guest",
|
||||||
|
"Port": 5672
|
||||||
},
|
},
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
|
Loading…
Reference in New Issue
Block a user