proc_id=$!
sleep $timeout
# after time out duration, publish the event
-publish_response_event $req_id
+publish_response_event $req_id kafkatopicres
# wait until the main process to be completed
wait $proc_id
proc_id=$!
sleep 10
# after 10s, publish the event
-publish_response_event $req_id
+publish_response_event $req_id kafkatopicres2
# wait until the main process to be completed
wait $proc_id
proc_id=$!
sleep $timeout
# after time out duration, publish the event
-publish_response_event $req_id
+publish_response_event $req_id kafkatopicres3
# wait until the main process to be completed
wait $proc_id
proc_id=$!
sleep 15
# after 15s, publish the event
-publish_response_event $req_id
+publish_response_event $req_id kafkatopicres
# wait until the main process to be completed
wait $proc_id
# asynch callout
do_curl DELETE /policytypes/STD_1/kafkadispatcher/alpha 200 jsonfiles/alpha_policy.json $req_id &
proc_id=$!
-publish_response_event $req_id
+publish_response_event $req_id kafkatopicres2
# wait until the main process to be completed
wait $proc_id