public void Bind() { if (!IsBindableMessageType) { _specifications.Add(new InvalidInMemoryConsumeTopologySpecification(TypeMetadataCache <TMessage> .ShortName, "Is not a bindable message type")); return; } var specification = new ExchangeBindingConsumeTopologySpecification(_messageTopology.EntityName); _specifications.Add(specification); }
public void Bind(string exchangeName, Action <IExchangeBindingConfigurator> configure = null) { var exchangeType = ExchangeTypeSelector.DefaultExchangeType; var binding = new ExchangeBindingConfigurator(exchangeName, exchangeType, true, false, ""); configure?.Invoke(binding); var specification = new ExchangeBindingConsumeTopologySpecification(binding); _specifications.Add(specification); }
public void Bind(ExchangeType?exchangeType = default, string routingKey = default) { if (!IsBindableMessageType) { _specifications.Add(new InvalidGrpcConsumeTopologySpecification(TypeMetadataCache <TMessage> .ShortName, "Is not a bindable message type")); return; } var specification = new ExchangeBindingConsumeTopologySpecification(_messageTopology.EntityName, exchangeType ?? _publishTopology.ExchangeType, routingKey); _specifications.Add(specification); }
public void Bind(Action <IExchangeBindingConfigurator> configure = null) { if (!IsBindableMessageType) { _specifications.Add(new InvalidRabbitMqConsumeTopologySpecification(TypeMetadataCache <TMessage> .ShortName, "Is not a bindable message type")); return; } var specification = new ExchangeBindingConsumeTopologySpecification(_publishTopology.Exchange); configure?.Invoke(specification); _specifications.Add(specification); }
public void Bind(string exchangeName, Action <IExchangeBindingConfigurator> configure = null) { if (string.IsNullOrWhiteSpace(exchangeName)) { throw new ArgumentException("Value cannot be null or whitespace.", nameof(exchangeName)); } var exchangeType = ExchangeTypeSelector.DefaultExchangeType; var specification = new ExchangeBindingConsumeTopologySpecification(exchangeName, exchangeType); configure?.Invoke(specification); _specifications.Add(specification); }
public void Bind(string exchangeName, ExchangeType exchangeType = ExchangeType.FanOut, string routingKey = default) { var specification = new ExchangeBindingConsumeTopologySpecification(exchangeName, exchangeType, routingKey); _specifications.Add(specification); }