Using Amazon SQS from Java

You can find the AWS SDK for Java API Reference - 1.2.15 here
http://docs.amazonwebservices.com/AWSJavaSDK/latest/javadoc/overview-summary.html
....
....
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.services.sqs.AmazonSQS;
import com.amazonaws.services.sqs.AmazonSQSClient;
....
....
static public String awsAccessKeyId = "";


static public String awsSecretAccessKey = "";
....
....

AmazonSQS sqs =
    new AmazonSQSClient(new BasicAWSCredentials(awsAccessKeyId ,awsSecretAccessKey ));

....
....

String url =
    sqs.createQueue(new CreateQueueRequest("dtm_test_queue")).getQueueUrl();
....
....

sqs.sendMessage(new SendMessageRequest(url, "Queue Data"));

Comments

Popular posts from this blog

Basic Send Message to MQ with Java and IBM MQ JMS

Basic Receive Message to MQ with Java and IBM MQ JMS

Configure Database Connection using MyBatis