I tried to use aws javascript sdk to talk to cmb's cqs server. And I got an AWS.SimpleQueueService.NonExistentQueue error. I traced the problem to that aws-sdk-js doesn't put the queue name in the HTTP Request URL path, instead it uses a QueueUrl parameter. Here is the HTTP request sent out by aws-sdk-js
POST / HTTP/1.1
User-Agent: aws-sdk-nodejs/2.1.8 darwin/v0.10.33
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Content-Length: 178
Host: 135.104.238.162:6059
X-Amz-Date: 20150204T172109Z
Authorization: AWS4-HMAC-SHA256 Credential=SMN034Y3U4IRY9ZV38IG/20150204/us-east-1/sqs/aws4_request, SignedHeaders=host;x-amz-date, Signature=b8391d89d3e11ab8db355764d67c6e8939dab9f00238c6dde1f37bafff2beba8
Connection: keep-alive
Action=ReceiveMessage&MaxNumberOfMessages=1&QueueUrl=http%3A%2F%2F135.104.238.162%3A6059%2F422904998956%2FTestQueue&Version=2012-11-05&VisibilityTimeout=30&WaitTimeSeconds=20
But cmb expects the queue info in the PATH part of the request. such as
POST /422904998956/TestQueue HTTP/1.1
User-Agent: aws-sdk-nodejs/2.1.8 darwin/v0.10.33
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Content-Length: 178
Host: 135.104.238.162:6059
X-Amz-Date: 20150204T172109Z
Authorization: AWS4-HMAC-SHA256 Credential=SMN034Y3U4IRY9ZV38IG/20150204/us-east-1/sqs/aws4_request, SignedHeaders=host;x-amz-date, Signature=b8391d89d3e11ab8db355764d67c6e8939dab9f00238c6dde1f37bafff2beba8
Connection: keep-alive
Action=ReceiveMessage&MaxNumberOfMessages=1&Version=2012-11-05&VisibilityTimeout=30&WaitTimeSeconds=20
The Amazon's document also states that queue info should be in the URL's path
I submitted a bug report to aws-sdk-js, but the maintainer suggested that the queue info should be either in the URL path or as QueueUrl parameter. Many tools, such aws-sdk-js and CLI depend on this. And SQS server should support both. He suggested I raise an issue here.
By the way, the error is raised in com/comcast/cqs/controller/CQSCache.java:71 function getCachedQueue(), it only checks the URL, not the parameters in the body.