From 595a194c05f84803cc20737a4759c9e49b6d85b6 Mon Sep 17 00:00:00 2001 From: Denis Tereshkin Date: Mon, 3 Jan 2022 10:55:24 +0700 Subject: [PATCH] junction: configurable broker identity --- src/ATrade/Driver/Junction.hs | 4 ++-- src/ATrade/Driver/Junction/ProgramConfiguration.hs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ATrade/Driver/Junction.hs b/src/ATrade/Driver/Junction.hs index 1034a0a..83be723 100644 --- a/src/ATrade/Driver/Junction.hs +++ b/src/ATrade/Driver/Junction.hs @@ -61,7 +61,7 @@ import Colog (HasLog (getLogActi logTextStdout, (>$<)) import Colog.Actions (logTextHandle) -import Control.Concurrent (threadDelay) +import Control.Concurrent (threadDelay, QSem, waitQSem, signalQSem) import Control.Exception.Safe (MonadThrow, bracket) import Control.Monad (forM_, forever) @@ -305,7 +305,7 @@ junctionMain descriptors = do securityParameters <- loadBrokerSecurityParameters cfg bracket (startBrokerClient - "broker" + (encodeUtf8 $ brokerIdentity cfg) ctx (brokerEndpoint cfg) (brokerNotificationEndpoint cfg) diff --git a/src/ATrade/Driver/Junction/ProgramConfiguration.hs b/src/ATrade/Driver/Junction/ProgramConfiguration.hs index af2cde5..5591646 100644 --- a/src/ATrade/Driver/Junction/ProgramConfiguration.hs +++ b/src/ATrade/Driver/Junction/ProgramConfiguration.hs @@ -23,6 +23,7 @@ data ProgramConfiguration = brokerNotificationEndpoint :: T.Text, brokerServerCert :: Maybe FilePath, brokerClientCert :: Maybe FilePath, + brokerIdentity :: T.Text, quotesourceEndpoint :: T.Text, quotesourceServerCert :: Maybe FilePath, quotesourceClientCert :: Maybe FilePath,