/// <summary> /// 关闭并释放通道 /// </summary> public void Dispose() { if (PublishChannel.IsOpen) { PublishChannel.Close(); } PublishChannel.Dispose(); }