using RabbitMQ.Client; using System; namespace EntrustSettle.EventBus { /// /// RabbitMQ持久连接 /// 接口 /// public interface IRabbitMQPersistentConnection : IDisposable { /// /// 是否已经连接 /// bool IsConnected { get; } /// /// 尝试重连 /// /// bool TryConnect(); /// /// 创建Model /// /// IModel CreateModel(); /// /// 发布消息 /// /// /// /// void PublishMessage(string message, string exchangeName, string routingKey); /// /// 订阅消息 /// /// void StartConsuming(string queueName); } }