TheClimateCorporation / squeedo

clojure core.async based amazon SQS message processing
Apache License 2.0
62 stars 28 forks source link

Allow queueing of messages with SQS attributes #5

Closed ghost closed 9 years ago

ghost commented 9 years ago

The AWS SDK has support for attributes for SQS messages. This exists in com.amazonaws.services.sqs.model.SendMessageRequest/withMessageAttributes. These would be useful for fields that might normally be in an HTTP header, such as content-type, accept-types, api keys, etc... This in turn would allow us to do things like utilize a single queue for various serialization formats.

Unfortunately, Bandalore doesn't appear to support this directly, as there is no way to inject these attributes there either, so this would either require Squeedo to implement its own message send functionality, or we would need to submit a PR to Bandalore to support this before implementing in Squeedo.

Example of how this might be used:

(sqs/enqueue my-connection my-message-body :message-attrs {:content-type "application/json"})