awslabs / awslabs/amazon-sqs-java-messaging-lib

set Q url with different AWS account

Open
#68 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
183
Forks
150
PR merge metrics
No merged PRs in 30d

Description

Hello team,
How can set the Q url if the q is exists on different AWS account
for both receiving and sending.

SQSConnectionFactory connectionFactory = new SQSConnectionFactory(
new ProviderConfiguration(),
AmazonSQSClientBuilder.standard()
.withCredentials( new DefaultAWSCredentialsProviderChain())
);

@Bean
public DefaultJmsListenerContainerFactory jmsListenerContainerFactory() {
DefaultJmsListenerContainerFactory factory =
new DefaultJmsListenerContainerFactory();
factory.setConnectionFactory(this.connectionFactory);
factory.setDestinationResolver(new DynamicDestinationResolver());
factory.setConcurrency("3-10");
return factory;
}

and my listener is looks like

@JmsListener(destination = "${jms.outboundQueueName}")
public void onReceive(String message) {
try {
log.info("onReceive request and send to : "+message);
} catch (Exception e) {
log.warn("sendErrorMessage" + e.getMessage());
}
}

Eg:
How can access this q using url (eg: https://sqs.ap-southeast-2.amazonaws.com/123456/qname)

Thanks
Sidath

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.