skyscreamer/nevado

can't change sqs endpoint

don41382 opened this issue · 2 comments

I am using version 1.0.0 with the AmazonAwsSQSConnector and I can't change the sqs endpoint.

It should be possible to select a different endpoint. The endpoint is hardcoded:

com.amazonaws.services.sqs.AmazonSQSClient:175 setEndpoint("queue.amazonaws.com");

The main problem is, that in the AmazonAwsSQSConnector the _amazonSQS is in final and in default scope. So it can't extended or changed in any way.

Felix

Good point. I'm adding getters for the clients so you can easily change the endpoints.

Also, I'll leave the issue open. I'd like to come back and add configuration options for defining endpoints.

Please confirm whether the getters are sufficient to set the end points for now, and I'll roll it out as 1.0.1.

Fixed in #33

You can now define custom endpoints in NevadoConnectionFactory:

<bean id="connectionFactory" class="org.skyscreamer.nevado.jms.NevadoConnectionFactory">
    <property name="sqsConnectorFactory" ref="sqsConnectorFactory" />
    <property name="awsAccessKey" value="${aws.accessKey}" />
    <property name="awsSecretKey" value="${aws.secretKey}" />
    <property name="awsSQSEndpoint" value="http://sqs.ap-southeast-1.amazonaws.com" />
    <property name="awsSNSEndpoint" value="http://sns.ap-southeast-1.amazonaws.com" />
</bean>