Created
January 22, 2019 07:31
-
-
Save rozaydin/c5e41b9618370cbe72a62a2b76941d25 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Primary | |
@Bean("AwsSqs") | |
public AmazonSQSAsync createAWSSQSClient() { | |
String endpoint = "http://localhost:9324"; | |
String region = "elasticmq"; | |
String accessKey = "x"; | |
String secretKey = "x"; | |
AmazonSQSAsync client = | |
AmazonSQSAsyncClientBuilder.standard() | |
.withCredentials( | |
new AWSStaticCredentialsProvider(new BasicAWSCredentials(accessKey, secretKey))) | |
.withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(endpoint, region)) | |
.build(); | |
String queueUrl = client.getQueueUrl("AOD-MQttDropConnQueue").getQueueUrl(); | |
client.sendMessage(queueUrl, "mqtt-client-id"); | |
return client; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment