Ejemplo n.º 1
0
        public ILinkProducerBuilder MessageProperties(LinkMessageProperties value)
        {
            if (value == null)
            {
                throw new ArgumentNullException(nameof(value));
            }

            return(new LinkProducerBuilder(this, messageProperties: value.Clone()));
        }
Ejemplo 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)));
        }