Stomp Failover does not work: Unable to cast object of type 
'System.Collections.DictionaryEntry' to type 'Apache.NMS.Stomp.MessageConsumer'.
--------------------------------------------------------------------------------------------------------------------------------------------

                 Key: AMQNET-310
                 URL: https://issues.apache.org/jira/browse/AMQNET-310
             Project: ActiveMQ .Net
          Issue Type: Bug
          Components: Stomp
         Environment: Windows
            Reporter: Markus Jung | Ogitix
            Assignee: Jim Gomes


Sometimes the exception occurs once the connection to the broker is broken. 
Sometimes the reconnect is done, but with the producer is slow and the consumer 
receives old messages after sending a new only.
I found the mistake causing that:

In class Apache.NMS.Stomp.Session method ClearMessagesInProgress is a 
type-mismatch. 
                foreach(MessageConsumer consumer in this.consumers)

But consumers is a dictionary, so it should be:

                foreach(MessageConsumer consumer in this.consumers.Values)

Once this line is changed, failover works fine even with ssl.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to