Fully robust message queue in Linux/BASH [closed]
I'm trying to implement a message queueing system using a named pipe. To read from the pipe I've used: pump_read=1 while [[ ${pump_read} -eq 1]]; do IFS="|" read pump_f1 pump_f2 pump_f3 < queuefile echo "${pump_f1}|${pump_f1}|${pump_f3}" >> pump.log done To write to the named pipe I've used echo "x|y|z" | ssh user@host "cat > queuefile" I'm using this method because the reader and writers may not be on the same hosts. Mostly this works but reasonably frequently I will get rows in my log of "||" as though an empty line has been written into the pipe. I also have times when messages will disappe
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.