Uploaded image for project: 'ActiveMQ .Net'
  1. ActiveMQ .Net
  2. AMQNET-310

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.5.1
    • Stomp
    • None
    • Windows

    Description

      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.

      Attachments

        Activity

          People

            tabish Timothy A. Bish
            markus.ogitix Markus Jung | Ogitix
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: