protected Receiver(QSettingModel qSetting) { SettingModel = qSetting; var connectionString = QCreateConnectionString.CreateConnection(qSetting, false); _bus = RabbitHutch.CreateBus(connectionString); if (HaveRequestMessage) { _bus.RespondAsync <TRequest, TResponse>(HandleRequestMessage, c => c.WithQueueName(qSetting.QueueName)); } if (HaveSendMessage) { _bus.SubscribeAsync <TMessage>( $"{qSetting.QueueName}_R", HandleSendMessage, c => c.WithQueueName($"{qSetting.QueueName}_R")); } }
private void CreateBus(QSettingModel setting) { var connectionString = QCreateConnectionString.CreateConnection(setting, true); _bus = RabbitHutch.CreateBus(connectionString); }