private void CreateModel() { if (StreamConnection == null || !StreamConnection.IsOpen) { Logger.LogWarning($"Connection is closed"); return; } try { if (IsModelDisposed) { Model = StreamConnection.CreateModel(); IsModelDisposed = false; Logger.LogInformation($"AMQP model sucessfully created, channelNo={Model.ChannelNumber}"); } else { Logger.LogDebug($"AMQP model already created, channelNo={Model.ChannelNumber}"); } } catch (Exception e) { throw new Exception($"Creating AMQP model errored, errorsCout={ProcessNewConsumerErrorCounter} {e}", e); } }