Browse Source

Fix

pull/1/head
Sebastian 10 years ago
parent
commit
8c82656075
  1. 8
      src/Squidex.Infrastructure.RabbitMq/RabbitMqEventBus.cs
  2. 1
      src/Squidex/Config/Domain/EventBusModule.cs

8
src/Squidex.Infrastructure.RabbitMq/RabbitMqEventBus.cs

@ -20,12 +20,12 @@ namespace Squidex.Infrastructure.RabbitMq
{
private readonly bool isPersistent;
private const string Exchange = "Squidex";
private readonly IConnectionFactory connectionFactory;
private readonly ConnectionFactory connectionFactory;
private readonly Lazy<IConnection> connection;
private readonly Lazy<IModel> channel;
private EventingBasicConsumer consumer;
public RabbitMqEventBus(IConnectionFactory connectionFactory, bool isPersistent)
public RabbitMqEventBus(ConnectionFactory connectionFactory, bool isPersistent)
{
Guard.NotNull(connectionFactory, nameof(connectionFactory));
@ -61,12 +61,12 @@ namespace Squidex.Infrastructure.RabbitMq
if (!currentConnection.IsOpen)
{
throw new ConfigurationException($"RabbitMq event bus failed to connect to {connectionFactory.VirtualHost}");
throw new ConfigurationException($"RabbitMq event bus failed to connect to {connectionFactory.Endpoint}");
}
}
catch (Exception e)
{
throw new ConfigurationException($"RabbitMq event bus failed to connect to {connectionFactory.VirtualHost}", e);
throw new ConfigurationException($"RabbitMq event bus failed to connect to {connectionFactory.Endpoint}", e);
}
}

1
src/Squidex/Config/Domain/EventBusModule.cs

@ -67,6 +67,7 @@ namespace Squidex.Config.Domain
})
.As<IEventStream>()
.As<IEventPublisher>()
.As<IExternalSystem>()
.SingleInstance();
}
else

Loading…
Cancel
Save