Exemplo n.º 1
0
        public ILinkProducerBuilder PublishProperties(LinkPublishProperties value)
        {
            if (value == null)
            {
                throw new ArgumentNullException(nameof(value));
            }

            return(new LinkProducerBuilder(this, publishProperties: value.Clone()));
        }
Exemplo n.º 2
0
        public ILinkProducer Build()
        {
            if (_topologyHandler == null)
            {
                throw new InvalidOperationException("Exchange must be set");
            }

            var config = new LinkProducerConfiguration(
                _publishTimeout,
                _recoveryInterval,
                _messageIdGenerator,
                _confirmsMode,
                _setUserId,
                _publishProperties.Clone(),
                _messageProperties.Clone(),
                _topologyHandler,
                _stateHandler,
                _serializer,
                _typeNameMapping
                );

            return(new LinkProducer(config, _link.CreateChannel(_channelStateHandler, config.RecoveryInterval)));
        }