Queues creation running standalone

332 views
Skip to first unread message

Juan Francisco Ottonello

unread,
Mar 11, 2015, 11:35:37 PM3/11/15
to elas...@googlegroups.com
Hi there,

I'm trying to use elasticmq to test an app. I could run and solve some problems but I'm stucked with creating the queues (it seems): I get AWS Error Message: AWS.SimpleQueueService.NonExistentQueue when I try to read from the queue. It seems that it should be created beforehand (which makes sense) but could not find how to do it. The readme shows just the general conf, is there a way to configure the queues there? Is that the best way to go? The RequestHandlerLogicModule is waiting to have a match for the queueName, but didn't find the creation part...

BTW I'm working with an existing java application that already uses sqs. It's build with maven and I want to redirect dev profile to use the local queue. I'm sure it's some small conf that I'm missing, just don't have a clue on what :S

Thanks!

Juan

Adam Warski

unread,
Mar 12, 2015, 3:44:50 AM3/12/15
to elas...@googlegroups.com
Hello,

you should create the queue using the SDK you are using, probably in your case the Amazon Java SDK.
So something like this:

AmazonSQSClient client = new AmazonSQSClient(new BasicAWSCredentials("x", "x"))
client.setEndpoint("http://localhost:9321")

String queueUrl = client.createQueue(new CreateQueueRequest("testQueue1")).getQueueUrl

client.sendMessage(new SendMessageRequest(queueUrl, "Message 1”))


Adam

--

---
You received this message because you are subscribed to the Google Groups "ElasticMQ" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticmq+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Reply all
Reply to author
Forward
0 new messages