How to send multiple emails using Amazon SQS and SNS?

In my JAVA application, I'm using Amazon SQS and SNS; I did the below steps:

Step 1: I pushed the message to SQS like,

SendMessageResult aSendMessageStatus = Amazon_SQS_Client.sendMessage(new SendMessageRequest().withQueueUrl(AWS_SQS_URL).withMessageBody(theRequestString));

Step 2: Created topic in SNS like,

CreateTopicResult createRes = Amazon_SNS_Client.createTopic(createReq);

Step 3: Now I am trying to send email by receiving the messages from SQS to 100 of customer.

Can someone advice me on how to subscribe the topic in SNS and send the emails to multiple email addresses.


For SNS to deliver the message, the 100 email address would have to subscribe to the topic. The email address will get confirmation message which they will have to respond to.

For your scenario, another option could be to use the queue service. It can be done in multiple ways. I have a setup as follows:

  • An application component sends a message to a queue
  • Another application component polls the queue, retrieves the message
  • From the message an email is composed and use SES service to deliver emails.
  • Another option is to use SNS -> SQS -> SES setup, where initial notification goes to SNS, and SNS delivers the notification to SQS.

    The notification message itself need not be the complete email message. It could be just a reference to the content and people to which the content is to be delivered. Your application could take care of forming the complete message.

    For a scenario where email is delivered to a general application user, I think SES is the right solution rather than SNS.

    链接地址: http://www.djcxy.com/p/32232.html

    上一篇: Amazon SNS动态主题案例场景

    下一篇: 如何使用Amazon SQS和SNS发送多封电子邮件?