Esempio n. 1
0
        public RabbitMQRemoteEventPublisher(
            IPoolManager poolManager,
            IRabbitMqEventBusOptions rabbitMqEventBusOptions
            )
        {
            _rabbitMqEventBusOptions = rabbitMqEventBusOptions;

            _connectionPool = poolManager.NewPool <IConnection>()
                              .WithFactory(new PooledObjectFactory(rabbitMqEventBusOptions))
                              .Instance();
        }
Esempio n. 2
0
        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();
        }