public void MqSeriesQueueMessageAdapterConstructorSetup()
        {
            var configuration = new MqSeriesQueueConfiguration {
                Id = "id", Selector = "TEST = 'TEST'"
            };

            var additionalConfiguration =
                new MqSeriesQueueConfiguration {
                Id = "id2", Selector = "TEST = 'TEST' AND (TEST2=:TEST2 OR TEST3 = :TEST3)"
            };

            _adapter           = new MqSeriesQueueMessageAdapter(configuration);
            _additionalAdapter = new MqSeriesQueueMessageAdapter(additionalConfiguration);
        }
        public void CorrelationId_Test()
        {
            var doc = new XDocument(new XDeclaration("1.0", "utf-8", "yes"),
                                    new XElement("mess", new XElement("messtype", "OPUstart"), new XElement("starttype", "2")));

            var message = new TextMessage();

            message.WriteXml(doc, Encoding.UTF8);

            string correlationID;

            using (var adapter = new MqSeriesQueueMessageAdapter(_configuration))
            {
                adapter.Connect();
                correlationID = adapter.Send(message)
                                .CorrelationId;
                adapter.Disconnect();
            }

            using (var adapter = new MqSeriesQueueMessageAdapter(_configuration))
            {
                adapter.Connect();
                try
                {
                    adapter.Receive(correlationID);
                }
                catch (MessagingException ex)
                {
                    Logger.LogError(ex, string.Empty);
                }
                finally
                {
                    adapter.Disconnect();
                }
            }
        }
 public void MQSeriesMessageAdapter_ConnectDisconnect()
 {
     using var adapter = new MqSeriesQueueMessageAdapter(_configuration);
     adapter.Connect();
     adapter.Disconnect();
 }