Пример #1
0
            public void Write(AmqpPrimitivesWriter amqpWriter, ushort channel, ushort classId, ushort methodId, object optionalArg)
            {
                var @params      = optionalArg as BasicPublishArgs;
                var maxFrameSize = amqpWriter.FrameMaxSize;

                if (@params.EstimatedSize >= (0.7 * maxFrameSize))                 // estimated size >= 70% of max, then dont buffer it
                {
                    AmqpChannelLevelFrameWriter.InternalBasicPublish(amqpWriter, channel, classId, methodId, optionalArg);
                }
                else
                {
                    AmqpChannelLevelFrameWriter.InternalBufferedBasicPublish(amqpWriter, channel, classId, methodId, optionalArg);
                }
            }
Пример #2
0
 public void Write(AmqpPrimitivesWriter amqpWriter, ushort channel, ushort classId, ushort methodId, object optionalArg)
 {
     // AmqpChannelLevelFrameWriter.InternalBasicPublish(amqpWriter, channel, classId, methodId, optionalArg);
     AmqpChannelLevelFrameWriter.InternalBufferedBasicPublish(amqpWriter, channel, classId, methodId, optionalArg);
 }