public void Init()
        {
            SimpleService.Called = false;

            this.messageProperties = new MessageProperties();
            this.messageProperties.ContentType = MessageProperties.CONTENT_TYPE_TEXT_PLAIN;

            this.adapter = new MockMessageListenerAdapter();
            this.adapter.MessageConverter = new SimpleMessageConverter();
        }
        public void Init()
        {
            service = new SimpleService();

            messageProperties = new MessageProperties();
            messageProperties.ContentType = MessageProperties.CONTENT_TYPE_TEXT_PLAIN;

            adapter = new MockMessageListenerAdapter();
            adapter.MessageConverter = new SimpleMessageConverter();
        }
예제 #3
0
        private void ReceiveAsync()
        {
            SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
            container.ConnectionFactory = this.connectionFactory;
            container.Queue = TestConstants.QUEUE_NAME;
            container.ConcurrentConsumers = 5;

            MessageListenerAdapter adapter = new MessageListenerAdapter();
            adapter.HandlerObject = new PocoHandler();
            container.MessageListener = adapter;
            container.AfterPropertiesSet();
            container.Start();
            Console.WriteLine("Main execution thread sleeping...");
            Thread.Sleep(30000);
            Console.WriteLine("Main execution thread exiting.");
            container.Stop();
            container.Shutdown();
        }