public RabbitMQRemoteEventPublisher( IPoolManager poolManager, IRabbitMqEventBusOptions rabbitMqEventBusOptions ) { _rabbitMqEventBusOptions = rabbitMqEventBusOptions; _connectionPool = poolManager.NewPool <IConnection>() .WithFactory(new PooledObjectFactory(rabbitMqEventBusOptions)) .Instance(); }
public RabbitMQRemoteEventPublisher( IPoolManager poolManager, IRabbitMQSetting rabbitMQSetting, IRemoteEventSerializer remoteEventSerializer ) { _remoteEventSerializer = remoteEventSerializer; _connectionPool = poolManager.NewPool <IConnection>() .InitialSize(rabbitMQSetting.InitialSize) .MaxSize(rabbitMQSetting.MaxSize) .WithFactory(new PooledObjectFactory(rabbitMQSetting)) .Instance(); }