public void Init(MQPairConfig config, bool sendOnly) { if (config is null) { return; } Config = config; Name = Config.Name; SendOnly = sendOnly; Counters = new MQRawClientCounters(Name, Config.IgnoreClientCounters); SenderSerializer = SerializerManager.GetByMimeType(Config.RequestOptions?.SerializerMimeType); if (SenderSerializer != null && Config.RequestOptions?.CompressorEncodingType.IsNotNullOrEmpty() == true) { SenderSerializer.Compressor = CompressorManager.GetByEncodingType(Config.RequestOptions?.CompressorEncodingType); } ReceiverSerializer = SerializerManager.GetByMimeType(Config.ResponseOptions?.SerializerMimeType); if (ReceiverSerializer != null && Config.ResponseOptions?.CompressorEncodingType.IsNotNullOrEmpty() == true) { ReceiverSerializer.Compressor = CompressorManager.GetByEncodingType(Config.ResponseOptions?.CompressorEncodingType); } OnInit(); }
protected MQueueRawClientBase() { Counters = new MQRawClientCounters(); Core.Status.Attach(collection => { collection.Add("Type", GetType().FullName); }); }