Skip to content

Commit 37f0cb4

Browse files
authored
Merge pull request #10 from ISISComputingGroup/broker_config
Can now use KAFKA_BROKER global config variable
2 parents 7b710ba + b017d6d commit 37f0cb4

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

forwarder_launch.bat

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
call C:\Instrument\Apps\EPICS\isis\forwarder\master\.venv\scripts\activate
1+
setlocal
2+
call %~dp0..\..\..\config_env_base.bat
3+
@echo on
4+
set "GETMACRO=%EPICS_KIT_ROOT%\support\icpconfig\master\bin\%EPICS_HOST_ARCH%\icpconfigGetMacro.exe"
5+
set "MYIOCNAME=FORWARDER"
6+
set "KAFKA_BROKER=livedata.isis.cclrc.ac.uk:31092"
7+
REM allow local config override in globals.txt
8+
for /f %%a in ( '%GETMACRO% "KAFKA_BROKER" %MYIOCNAME%' ) do ( set "KAFKA_BROKER=%%a" )
9+
10+
call %~dp0.venv\scripts\activate
211

312
set "EPICS_CA_ADDR_LIST=127.255.255.255 130.246.55.255"
413
set "EPICS_CA_AUTO_ADDR_LIST=NO"
514

6-
if "%INSTRUMENT%" == "HIFI" (
7-
set "BROKER=130.246.55.29:9092"
8-
) else (
9-
set "BROKER=livedata.isis.cclrc.ac.uk:31092"
10-
)
11-
1215
echo "starting forwarder"
13-
python C:\Instrument\Apps\EPICS\isis\forwarder\master\forwarder_launch.py --status-topic=%BROKER%/%INSTRUMENT%_forwarderStatus --config-topic=%BROKER%/%INSTRUMENT%_forwarderConfig --storage-topic=%BROKER%/%INSTRUMENT%_forwarderStorage --output-broker=%BROKER%
16+
python %~dp0forwarder_launch.py --status-topic=%KAFKA_BROKER%/%INSTRUMENT%_forwarderStatus --config-topic=%KAFKA_BROKER%/%INSTRUMENT%_forwarderConfig --storage-topic=%KAFKA_BROKER%/%INSTRUMENT%_forwarderStorage --output-broker=%KAFKA_BROKER%
17+

0 commit comments

Comments
 (0)