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.51k stars 194 forks source link

Setting the SQSRestServer port to something other than 9324 gives consumer error #72

Closed mortenlocka closed 8 years ago

mortenlocka commented 8 years ago

Setting the elasticmq port to something other than default: 'SQSRestServerBuilder.withPort(elasticMqPort).withInterface("localhost").start();'

During startup it shows the wrong port in the log: '15:54:00.102 [main] INFO o.e.rest.sqs.TheSQSRestServerBuilder - Started SQS rest server, bind address localhost:9325, visible server address http://localhost:9324'

Consumer fails with: 'java.net.ConnectException: Connection refused'

Everything works fine when using the default port 9324

adamw commented 8 years ago

You probably mean the visible server address http://localhost:9324 part? That's another setting: how the server is visible form the outside (can be a different host/port). You also need .withServerAddress(new NodeAddress(...). Does this help?

mortenlocka commented 8 years ago

Thanks!