Exemple #1
0
        public ServiceBusMessageConsumeTopology(IMessageTopology <TMessage> messageTopology, IServiceBusMessagePublishTopology <TMessage> publishTopology)
        {
            _messageTopology = messageTopology;
            _publishTopology = publishTopology;

            _specifications = new List <IServiceBusConsumeTopologySpecification>();
        }
Exemple #2
0
        public Task <ISendEndpoint> GetPublishSendEndpoint <T>(T message) where T : class
        {
            IServiceBusMessagePublishTopology <T> messageTopology = _publishTopology.GetMessageTopology <T>();

            if (!messageTopology.TryGetPublishAddress(_host.Address, out var publishAddress))
            {
                throw new PublishException($"An address for publishing message type {TypeMetadataCache<T>.ShortName} was not found.");
            }

            return(_endpointCache.GetSendEndpoint(publishAddress, x => CreateSendEndpoint(x, messageTopology.TopicDescription)));
        }