mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
BREAKING CHANGE Due to a lack of users, we remove the experimental code. The latest implementation can be found in release v1.4.56. This does not mean it will never be picked up again, but for now there are no plans.
53 lines
1.4 KiB
Bash
Executable File
53 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
export FAIRMQ_PATH=@FAIRMQ_BIN_DIR@
|
|
|
|
transport="zeromq"
|
|
|
|
if [[ $1 =~ ^[a-z]+$ ]]; then
|
|
transport=$1
|
|
fi
|
|
|
|
session="$(@CMAKE_BINARY_DIR@/fairmq/fairmq-uuid-gen -h)"
|
|
chan="data"
|
|
chanAddr=""
|
|
chanIpcFile="/tmp/fmq_$session""_""$chan""_""$transport"
|
|
chanAddr="ipc://""$chanIpcFile"
|
|
|
|
# setup a trap to kill everything if the test fails/timeouts
|
|
trap 'set +e; kill -TERM $SAMPLER_PID; kill -TERM $SINK_PID; wait $SAMPLER_PID; wait $SINK_PID; rm $chanIpcFile; exit 0' TERM
|
|
|
|
SAMPLER="fairmq-ex-multipart-sampler"
|
|
SAMPLER+=" --id sampler1"
|
|
SAMPLER+=" --transport $transport"
|
|
SAMPLER+=" --verbosity veryhigh"
|
|
SAMPLER+=" --session $session"
|
|
SAMPLER+=" --shm-segment-size 100000000"
|
|
SAMPLER+=" --shm-monitor true"
|
|
SAMPLER+=" --max-iterations 1"
|
|
SAMPLER+=" --control static --color false"
|
|
SAMPLER+=" --channel-config name=$chan,type=pair,method=connect,rateLogging=0,address=$chanAddr,linger=1000"
|
|
@CMAKE_CURRENT_BINARY_DIR@/$SAMPLER &
|
|
SAMPLER_PID=$!
|
|
|
|
SINK="fairmq-ex-multipart-sink"
|
|
SINK+=" --id sink1"
|
|
SINK+=" --transport $transport"
|
|
SINK+=" --verbosity veryhigh"
|
|
SINK+=" --session $session"
|
|
SINK+=" --shm-segment-size 100000000"
|
|
SINK+=" --shm-monitor true"
|
|
SINK+=" --control static --color false"
|
|
SINK+=" --channel-config name=$chan,type=pair,method=bind,rateLogging=0,address=$chanAddr"
|
|
@CMAKE_CURRENT_BINARY_DIR@/$SINK &
|
|
SINK_PID=$!
|
|
|
|
wait $SAMPLER_PID
|
|
wait $SINK_PID
|
|
|
|
set +e
|
|
rm $chanIpcFile
|
|
exit 0
|