Skip to content

Instantly share code, notes, and snippets.

@farshidce
Created December 19, 2016 18:47
Show Gist options
  • Save farshidce/5862bf17e03cc0fd2ccd7a70b55be3e2 to your computer and use it in GitHub Desktop.
Save farshidce/5862bf17e03cc0fd2ccd7a70b55be3e2 to your computer and use it in GitHub Desktop.
SHOVEL_NAME=$1
SRC_URI=$2
SRC_EXCH=$3
ROUTING_KEY=$4
DEST_URI=$5
DEST_EXCH=$6
ACK_MODE=on-confirm
SHOVEL_ARG="{\"src-uri\":\""${SRC_URI}"\", \"src-exchange\": \""${SRC_EXCH}"\", \"src-exchange-key\":\""${ROUTING_KEY}"\", \"dest-uri\":\""${DEST_URI}"\", \"dest-exchange\":\""${DEST_EXCH}"\", \"ack-mode\":\""${ACK_MODE}"\", \"reconnect-delay\": 0, \"prefetch-count\": 34460, \"delete-after\": \""never"\" }"
echo rabbitmqctl set_parameter shovel ${SHOVEL_NAME} """${SHOVEL_ARG}"""
echo `rabbitmqctl set_parameter shovel ${SHOVEL_NAME} """${SHOVEL_ARG}"""`
echo "shovel created successfully"
tail -f /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment