   constructor: ->
     @configure()
     @sqs = @generateSQSInstance()
-
-  configure: ->
-    aws.config.update
-      accessKeyId: config.queue.accessKeyId
-      secretAccessKey: config.queue.secretAccessKey
-      region: config.queue.region
-
+  ###Public API###
   registerQueue: (queueName, options, callback) ->
     #returns new queue in data argument of callback
     @sqs.createQueue {QueueName: queueName}, (err,data) =>

    subscriptionObject.unsubscribe()

  publish: (messageBody, delayInSeconds, callback) ->
    #TODO: Mongo-based persistence of delayed messages
    setTimeout @channel.publish.bind(this), delayInSeconds * 1000, @queueName, messageBody, callback

  receieveMessage: (callback) ->
    throw new Error "MongoQueue does not support fetching one message, it continually listens"
  deleteMessage: (callback) ->
    throw new Error "MongoQueue "


        throw new Error("Fatal SQS error, see Winston output")
      newQueue = new SQSQueue(queueName, data.QueueUrl, @sqs)
      callback err, newQueue
  ###Public API###
  configure: ->
    aws.config.update
      accessKeyId: config.queue.accessKeyId
      secretAccessKey: config.queue.secretAccessKey
      region: config.queue.region

  generateSQSInstance: ->
    new aws.SQS()
