[QFJ-825] Restart of SessionConnector might lead to creation of additional message processor threads Created: 06/Feb/15  Updated: 02/Apr/15  Resolved: 15/Mar/15

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: 1.5.3
Fix Version/s: 1.6.0

Type: Bug Priority: Major
Reporter: Christoph John Assignee: Christoph John
Resolution: Fixed Votes: 0
Labels: None


 Description   

When using a SingleThreadedEventHandlingStrategy it is expected that there is only one "QFJ Message Processor" thread. However, when starting a connector multiple times in a row or when quickly restarting it, there might be several message processor threads. This situation might lead to unforeseen effects, e.g. race conditions or sequence number issues.

The reason for this seems to be that the message processor thread is polling the event queue and does not get stopped correctly when waiting for the next message in the queue.
Workaround for the time being: make sure that you sleep at least 1000ms (polling interval on event queue) before (re)starting a connector after stopping it. This will give the message processor thread enough time to shutdown orderly.

todo

  • prevent concurrent startups of Initiator/Acceptor
  • prevent creation of multiple message processor threads
  • add some info logging that the message processor thread has been started/stopped

Generated at Mon Apr 29 04:05:57 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.