amazon simple queue service

2024-07-20 05:31
2024-07-20 05:32

CLI コマンドメモ

キューに大量のメッセージを流し込みたい

URL=<QUEUE_URL>
for i in `seq 1 1000`; do aws sqs send-message-batch --queue-url $URL --entries "[{\"Id\":\"${i}0\",\"MessageBody\":\"${i}0\"},{\"Id\":\"${i}1\",\"MessageBody\":\"${i}1\"},{\"Id\":\"${i}2\",\"MessageBody\":\"${i}2\"},{\"Id\":\"${i}3\",\"MessageBody\":\"${i}3\"},{\"Id\":\"${i}4\",\"MessageBody\":\"${i}4\"},{\"Id\":\"${i}5\",\"MessageBody\":\"${i}5\"},{\"Id\":\"${i}6\",\"MessageBody\":\"${i}6\"},{\"Id\":\"${i}7\",\"MessageBody\":\"${i}7\"},{\"Id\":\"${i}8\",\"MessageBody\":\"${i}8\"},{\"Id\":\"${i}9\",\"MessageBody\":\"${i}9\"}]" > /dev/null; done;
Copyright © 53ningen.com