Example #1
0
        protected override async Task Process(PublishItem <T> item, CancellationToken cancellationToken)
        {
            var msgSerialized = await _serializer.Serialize(item.Message);

            var channel  = _channelProvider.Provide();
            var msgProps = channel.CreateBasicProperties();

            channel.BasicPublish(ExchangeWithCheck,
                                 item.RoutingKey,
                                 msgProps,
                                 msgSerialized);
        }
 protected void Publish(PublishItem <T> item) => _publisher.Publish(item);
Example #3
0
 public void Publish(PublishItem <T> item) => Add(item);