Skip to content

Commit e1f60f8

Browse files
committed
revert setting PrefetchSize as it is not supported by RabbitMQ
1 parent 5f1cde5 commit e1f60f8

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/ServiceStack.RabbitMq/RabbitMqProducer.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ public class RabbitMqProducer : IMessageProducer, IOneWayClient
1717
public Action<string, BasicGetResult> GetMessageFilter { get; set; }
1818
//http://www.rabbitmq.com/blog/2012/04/25/rabbitmq-performance-measurements-part-2/
1919
//http://www.rabbitmq.com/amqp-0-9-1-reference.html
20-
public uint PrefetchCount { get; set; } = 20;
21-
public ushort PrefetchSize { get; set; } = 0;
20+
public ushort PrefetchCount { get; set; } = 20;
2221

2322
private IConnection connection;
2423
public IConnection Connection
@@ -41,7 +40,9 @@ public IModel Channel
4140
if (channel == null || !channel.IsOpen)
4241
{
4342
channel = Connection.OpenChannel();
44-
channel.BasicQos(PrefetchCount, PrefetchSize, global: false);
43+
//prefetch size is no supported by RabbitMQ
44+
//http://www.rabbitmq.com/specification.html#method-status-basic.qos
45+
channel.BasicQos(prefetchSize: 0, prefetchCount: PrefetchCount, global: false);
4546
}
4647
return channel;
4748
}

0 commit comments

Comments
 (0)