You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by neosmrt <ne...@gmail.com> on 2014/02/10 10:55:40 UTC

strange error when consume message from queue/topic.

I am facing a strange issue. 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) 
            { }



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