Skip to content

Commit

Permalink
Merge pull request #6 from ApsOps/queue-url-bugfix
Browse files Browse the repository at this point in the history
Queue url bugfix
  • Loading branch information
ApsOps authored Aug 28, 2017
2 parents aa865b8 + 166c2ee commit 2c615fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ func startConsumer(queue Queue) {
for msg := range queue.sem {
if sendMessageToURL(*msg.Body, queue) {
_, err := svc.DeleteMessage(&sqs.DeleteMessageInput{
QueueUrl: &queue.URL,
QueueUrl: queue.msgparams.QueueUrl,
ReceiptHandle: msg.ReceiptHandle,
})
if err != nil {
log.Fatalf(err.Error())
log.Fatalf("%s: Error while deleting processed message from SQS: %s", queue.Name, err.Error())
}
}
}
Expand All @@ -192,7 +192,7 @@ func startPoller(queue Queue) {
func pollSQS(queue Queue) {
resp, err := svc.ReceiveMessage(queue.msgparams)
if err != nil {
log.Fatalf(err.Error())
log.Fatalf("%s: Error while reading message from SQS: %s", queue.Name, err.Error())
}

for _, msg := range resp.Messages {
Expand Down

0 comments on commit 2c615fa

Please sign in to comment.