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.52k stars 193 forks source link

Configure #119

Closed Fosol closed 6 years ago

Fosol commented 6 years ago

How do you configure elasticmq accessKeyId, secretAccessKey and region? I keep getting InvalidClientTokenId: The security token included in the request is invalid.

Also what is the default QueueUrl path? I've included a custom configuration file.

queues {
    wcm {
        deadLettersQueue {
            name = "wcm-dead-letters",
            maxReceiveCount = 3
        }
    },
    wcm-dead-letters { }
}
adamw commented 6 years ago

You can set the access key id and secret key to anything you want, these are not checked. The important part is that you set the endpoint on the AWS client to the address on which ElasticMQ is running. I'm not sure what language you are using, but here's the Java version:

https://github.com/adamw/elasticmq/blob/master/rest/rest-sqs-testing-amazon-java-sdk/src/test/scala/org/elasticmq/rest/sqs/AmazonJavaSdkTestSuite.scala#L51-L52

As for the queue url, you can obtain in using CreateQueue or GetQueueUrl

Fosol commented 6 years ago

I'm just running the Queue with the java run command. java -Dconfig.file=custom.conf -jar elasticmq-server-0.13.8.jar

How do I put the access key id and secret key into that?

adamw commented 6 years ago

Ah. Well that's all that you need to do. You only need the access keys on the client side - that is when you try to connect to the server. There, you can use any values that you'd like.