using System.Collections.Generic; using RabbitMQ.Client; namespace Ray.EventBus.RabbitMQ { public class RabbitOptions { public string UserName { get; set; } public string Password { get; set; } public string VirtualHost { get; set; } public int PoolSizePerConnection { get; set; } = 200; public int MaxConnection { get; set; } = 20; /// /// 消费者批量处理每次处理的最大消息量 /// public ushort CunsumerMaxBatchSize { get; set; } = 3000; /// /// 消费者批量处理每次处理的最大延时 /// public int CunsumerMaxMillisecondsInterval { get; set; } = 1000; public string[] Hosts { get; set; } public List EndPoints { get { var list = new List(); foreach (var host in Hosts) { list.Add(AmqpTcpEndpoint.Parse(host)); } return list; } } } }