Uploaded image for project: 'QuickFIX/J'
  1. QuickFIX/J
  2. QFJ-678

EventHandlingStrategy BlockingQueues are unbounded

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5.0, 1.5.2
    • Fix Version/s: 1.6.0
    • Component/s: Engine
    • Labels:
      None

      Description

      In reference to a question on the quickfixj-users list from 2012-04-25:
      "1. Why are all the LinkedBlockingQueues unbounded in the EventHandlingStrategies?

      We've found that if you have to go back to the beginning of a session and have a large amount of traffic to process you can end up with memory issues without using a bounded queue."

      Both quickfix.mina.EventHandlingStrategy implementations contain a BlockingQueue of Messages, or a wrapper of Messages in the case of SingleThreadedEventHandlingStrategy, and both of these queues are unbounded. We had an issue where while trying to recover from a period of downtime, the resent traffic would fill this queue faster than it could be processed, leading the app to run out of memory. We solved this by overriding the classes locally and giving the queues a capacity of 5000.

      I'd like to see this improvement made into the vanilla library. While hard coding to some large value less than Integer.MAX_VALUE would probably be an improvement, ideally this could become a configuration option or an optional parameter to the constructors of Initiators and Acceptors.

        Attachments

          Activity

            People

            • Assignee:
              chrjohn Christoph John
              Reporter:
              chabala Greg Chabala
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: