        q-url (.getQueueUrl (.getQueueUrl sqs-client q-name))
        ;; create an access policy to allow the topic to publish to the queue
        access-policy (sns-to-sqs-access-policy sns-client sqs-client queue-name exchange-names)
-       q-attrs (java.util.HashMap. {"Policy" access-policy})
+       q-attrs (HashMap. {"Policy" access-policy})
 
        ;; create and empty SetQueueAttributesRequest object and then set the attributes on it
        set-queue-attrs-request (doto (SetQueueAttributesRequest.)


(defn- get-queue-arn
  "Get the Amazon Resource Name (ARN) for the given queue.
   Queue name must be normalized."
  [sqs-client queue-name]
  (let [q-url (.getQueueUrl (.getQueueUrl sqs-client queue-name))
        q-attrs (->> (java.util.ArrayList. ["QueueArn"])
                     (.getQueueAttributes sqs-client q-url)
                     .getAttributes
                     (into {}))]
   (get q-attrs "QueueArn")))

(defn- create-async-handler
  "Creates a thread that will asynchronously pull messages off the queue, pass them to the handler,

  (memoize -get-queue-url))

(defrecord SQSQueueBroker
  ;; A record containig fields related to accessing SNS/SQS exchanges and queues.
  [
   ;; Connection to AWS SNS
   sns-client

