Example #1
0
 /// <summary>
 /// 创建消息队列连接来自微软配置并打开
 /// </summary>
 /// <param name="factory">Rabbit连接工厂</param>
 /// <param name="funQueueReader">消息队列读取</param>
 /// <param name="options">配置</param>
 /// <param name="beforeConfigBuilder">生成配置前回调</param>
 /// <returns>消息队列连接</returns>
 public static IMessageQueueConnection CreateConnectionConfigureAndOpen(this IMessageQueueConnectionFactory factory, Func <string, IRabbitMessageQueueReader> funQueueReader = null, Action <RabbitConnectionWrapInfo> options = null, Action <IConfigurationBuilder, string, object> beforeConfigBuilder = null)
 {
     return(factory.CreateConnectionAndOpen(jsonFile =>
     {
         return new RabbitMessageQueueConfiguration(jsonFile, beforeConfigBuilder);
     }, options));
 }