Пример #1
0
        // ReSharper disable once UnusedParameter.Local
        private void OnMqMessageDeserializationFailed(object sender, MessageDeserializationFailedEventArgs eventArgs)
        {
            var rawData          = eventArgs.RawData as byte[] ?? eventArgs.RawData.ToArray();
            var basicMessageData = TicketHelper.ParseUnparsableMsg(rawData);

            ExecutionLog.Info($"Extracted the following data from unparsed message data: [{basicMessageData}], raising OnUnparsableMessageReceived event");
            var dispatchEventArgs = new UnparsableMessageEventArgs(basicMessageData);

            Metric.Context("MtsSdk").Meter("TicketDeserializationFailed", Unit.Items).Mark();
            UnparsableTicketResponseReceived?.Invoke(this, dispatchEventArgs);
        }
Пример #2
0
        // ReSharper disable once UnusedParameter.Local
        private void OnMqMessageDeserializationFailed(object sender, MessageDeserializationFailedEventArgs eventArgs)
        {
            var rawData          = eventArgs.RawData as byte[] ?? eventArgs.RawData.ToArray();
            var basicMessageData = TicketHelper.ParseUnparsableMsg(rawData);

            _executionLog.LogInformation($"Extracted the following data from unparsed message data: [{basicMessageData}], raising OnUnparsableMessageReceived event");
            var dispatchEventArgs = new UnparsableMessageEventArgs(basicMessageData);

            _metricsRoot.Measure.Meter.Mark(new MeterOptions {
                Context = "MtsSdk", Name = "TicketDeserializationFailed", MeasurementUnit = Unit.Calls
            });
            UnparsableTicketResponseReceived?.Invoke(this, dispatchEventArgs);
        }