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

Can no longer send messages to initiators that have not yet been started

    Details

    • Type: Bug
    • Status: Open
    • Priority: Default
    • Resolution: Unresolved
    • Affects Version/s: 1.4.0
    • Fix Version/s: None
    • Component/s: Engine
    • Labels:
      None

      Description

      We have some system states where we disable network connection but still may have messages that we wish to deliver to the gateway, i.e., message store, for future delivery to the counterparty when we re-enable the network connection. Our technique is to create a SocketAcceptor or SocketInitiator, but not to start it. Since we upgraded from QF/J 1.2.1 to QF/J 1.4.0, this is no longer working for initiators.

      Traced this back to QFJ-354, revision number 874. QFJ-354 allows a SocketInitiator to be stopped and restarted. (Previously it could be stopped, but the only way to restart it was to recreate it.) As part of this change, they moved where the sessions are created out of the constructor. (Session creation is one way a session can be registered.) QFJ-354 was part of the 1.4.0 release. There was no similar change for acceptors.

      I don't see any reason why the session creation cannot be moved back into the constructor. It does not interfere with the intent of QFJ-354.
      Patch attached.

      While in the neighbourhood, noticed the following two lines in the AbstractSocketInitiator constructor:

      ByteBuffer.setAllocator(new SimpleByteBufferAllocator());
      ByteBuffer.setUseDirectBuffers(false);
      

      This should be some sort of static initialization. e.g., for applications that use Mina for their own purposes as well as QF/J, they may need control over the buffer type and allocator, and shouldn't have to worry about QF/J changing it on the fly.

        Attachments

        1. diff.txt
          2 kB
          Rhys Yarranton
        2. diff.txt
          1 kB
          Rhys Yarranton

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ryarran Rhys Yarranton
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: