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

Change default TaskRunnerFactory to create DedicatedTaskRunner

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.0
    • 1.5.1, 1.6.0
    • ActiveMQ
    • .NET 2.0, .NET 3.5, .NET 4.0

    Description

      The TaskRunnerFactory creates a PooledTaskRunner that serializes the background worker threads. This can create a non-optimal runtime where asynchronous tasks become synchronous, and can get stuck behind a long-running task. This is observed when starting an application that makes many different connections to brokers using the failover protocol. The actual connection steps are done in a background thread. One broker takes a long time to initialize the connection, and the others are fast initialization connections. All of the fast initialization connections get stuck behind the slow connection. It would be assumed that these connection initializations should be running simultaneously. If there is a run-time connection interruption, and the failover protocol has to re-connect, the same thing will happen again. This severely degrades the performance of an application.

      The solution is to change the TaskRunnerFactory to create a DedicatedTaskRunner. This gives the expected and desired result where the connection initializations execute simultaneously without being queued up.

      Attachments

        Activity

          People

            jgomes Jim Gomes
            jgomes Jim Gomes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 6h
                6h
                Remaining:
                Remaining Estimate - 6h
                6h
                Logged:
                Time Spent - Not Specified
                Not Specified