softwaremill / elasticmq

In-memory message queue with an Amazon SQS-compatible interface. Runs stand-alone or embedded.
https://softwaremill.com/open-source/
Apache License 2.0
2.51k stars 194 forks source link

MaxReceiveCount should be a string representation of an int, not an int #110

Closed AjayTripathy closed 7 years ago

AjayTripathy commented 7 years ago

See: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html

It's surprising and a little unintuitive, but AWS expects a string representation of MaxReceiveCount:

String redrivePolicy = "{\"maxReceiveCount\":\"5\", \"deadLetterTargetArn\":\"arn:aws:sqs:us-east-2:123456789012:MyDeadLetterQueue\"}";

If you try to send a string over to elasticmq, however, elasticmq will complain that it expects an int.

adamw commented 7 years ago

Indeed that should be corrected - maybe you could attempt a PR to fix that? :)

AjayTripathy commented 7 years ago

Sure. Just wanted to make sure I had this right before starting.