public RabbitMQMessageBusBroker(IRabbitMQConnectionProvider rabbitMQConnectionProvider, IHostNameProvider hostNameProvider)
 {
     _rabbitMQConnectionProvider = rabbitMQConnectionProvider;
     _hostNameProvider           = hostNameProvider;
     _connectionString           = _rabbitMQConnectionProvider.GetConnectionString(ConnectionStringKey);
     _connection = _rabbitMQConnectionProvider.GetConnection(_connectionString);
 }
Ejemplo n.º 2
0
 public IEnumerable <NotifyEntry> GetNotifications()
 {
     //verify if there is a connection string set in the web.config
     if (_rabbitMQConnectionProvider.GetConnectionString(RabbitMQMessageBusBroker.ConnectionStringKey) == null)
     {
         yield return(new NotifyEntry {
             Message = T("You need to configure RabbitMQ MessageBus connection string."), Type = NotifyType.Warning
         });
     }
 }