Need help for a strange issue I am facing when try to consume a message in
ActiveMQ. I pushed a message in a queue. Then I created an application which
acts as consumer of a message. In AciveMQ Web console I can see 1 message is
Enqueued and in Pending Messages column. Then When I call consumer.Recieve()
an error is thrown.

*Not a valid Win32 FileTime.\r\nParameter name: fileTime*

The same thing is happening if I use a topic instead of a queue. Here's the
code which I wrote.

 try
            {
                Uri connecturi = new Uri(brokerUri);

                IConnectionFactory factory = new
ConnectionFactory(brokerUri);

                using (IConnection connection = factory.CreateConnection())
                {
                    connection.Start();
                    using (ISession session = connection.CreateSession())
                    {
                        // Create a consumer
                        using (IMessageConsumer consumer =
session.CreateConsumer(SessionUtil.GetDestination(session, name,
DestinationType.Queue)))
                        {
                            // Consume a message
                            var message = consumer.Receive() as
ActiveMQMapMessage;
                            
                            if (message == null)
                                Console.WriteLine("No message received!");
                            else
                                Console.WriteLine("Received message with ID:  
" + message.NMSMessageId);
                        }
                    }
                    connection.Stop();
                }
            }
            catch (Exception ex) 
            { }

Thanks for your help in advance. Please reply if you need more info.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/strange-error-when-consume-message-from-queue-topic-tp4677680.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to