Task PublishMessage(MulticastTransportOperation transportOperation, ConfirmsAwareChannel channel)
        {
            var message = transportOperation.Message;

            var properties = channel.CreateBasicProperties();

            properties.Fill(message, transportOperation.DeliveryConstraints, channel.SupportsDelayedDelivery, out _);

            return(channel.PublishMessage(transportOperation.MessageType, message, properties));
        }
        Task PublishMessage(MulticastTransportOperation transportOperation, ConfirmsAwareChannel channel, CancellationToken cancellationToken)
        {
            var message = transportOperation.Message;

            var properties = channel.CreateBasicProperties();

            properties.Fill(message, transportOperation.Properties);

            return(channel.PublishMessage(transportOperation.MessageType, message, properties, cancellationToken));
        }
Beispiel #3
0
        Task PublishMessage(MulticastTransportOperation transportOperation, ConfirmsAwareChannel channel, RabbitMQMessagePriority priority)
        {
            var message = transportOperation.Message;

            var properties = channel.CreateBasicProperties();

            properties.Fill(message, transportOperation.DeliveryConstraints, out _);
            if (priority != null)
            {
                properties.Priority = priority.Priority;
            }
            return(channel.PublishMessage(transportOperation.MessageType, message, properties));
        }