You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2021/09/10 07:15:00 UTC

[jira] [Created] (CAMEL-16940) camel-quickfix - Consumer should defer setting up network until starting

Claus Ibsen created CAMEL-16940:
-----------------------------------

             Summary: camel-quickfix - Consumer should defer setting up network until starting
                 Key: CAMEL-16940
                 URL: https://issues.apache.org/jira/browse/CAMEL-16940
             Project: Camel
          Issue Type: Improvement
          Components: camel-quickfix
    Affects Versions: 3.4.6
            Reporter: Claus Ibsen


Reported on user mailing list


Alexander A anpilov.av@gmail.com via camel.apache.org 
Sep 1, 2021, 7:06 PM (9 days ago)
to users

Hi!

I have 2 camel routes from quickfix consumers.
Camel version is 3.4.4 but behaviour is the same with greater versions too.
2 sessions are described in fix.properties file.
Second route is .autoStartup(false).

When camel starts a quickfix consumer for the active route, it starts
second quickfix session (for disabled route) too.

This happens in org.apache.camel.component.quickfixj.doStart()
-> quickfix.SocketInitiator

private void initialize() throws ConfigError {
        if (isStarted.equals(Boolean.FALSE)) {
            eventHandlingStrategy.setExecutor(longLivedExecutor);
            createSessionInitiators();
            for (Session session : getSessionMap().values()) {
                Session.registerSession(session);
            }
            *startInitiators();*
            eventHandlingStrategy.blockInThread();
            isStarted = Boolean.TRUE;
        } else {
            log.warn("Ignored attempt to start already running
SocketInitiator.");
        }
    }

One possible workaround - store sessions in different files.

QuickFixJ approach for independen sessions startup described here:
https://stackoverflow.com/questions/61611047/how-to-manage-and-reload-multiple-quickfix-j-sessions-independently
.

How can I implement independent sessions startup with Camel using single
config file?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)