SNS Webhook continues to receive the same request over and over - amazon-sns

I've set up a SNS webhook -- an endpoint that subscribes to a topic. Whenever my app publishes to the topic (users), the topic successfully forwards the data as a POST request to my webhook endpoint (/users).
However, after sending the request, my endpoint continues to receive the same request over and over again. Does anyone know why SNS after successfully making a request to my endpoint continues to send the same request? Upon receiving the request, does my endpoint need to tell my topic that the data has been received? Would I do this with the SNS SDK?

Ok so this was my mistake. I was using express (node) and in the endpoint that was the SNS webhook, I did not return with a response. Adding this line of code as the final line in the endpoint fixed my issue:
return res.status(200).json({success: true});

Related

Push notifications requests sent to Firebase logs

I'm struggling to find a way to see the logs of all push notifications requests sent to my Firebase project.
Since I'm using SNS, and it uses Cloud Messaging API (Legacy) to send these messages, I need to find out why I'm receiving 200 responses but the messages are never delivered.To see the Payload coming from SNS would be really helpful.
Any suggestions?
Thank you!!

RabbitMQ - is it possible to consume messages through http POST

I am using RabbitMQ as message broker. I want the messages from the queue to the consumer are sent by the Http POST method.
What I want is that when a message (body of the post formatted in JSON) is ready in the queue, it is sent to the consumer through HTPP post instead of AMQP.
Are there any plugins or something else?
I searched, but I only found HTTP API to publish a message, to manage the queues and to send GET req to the queues (but I do not want to do this).
Thanks

Response of cloud function

I'm wondering if it is possible to get a response message when Firebase Cloud Function is executed succesfully.
The case is I'm trying to send an email, but I would like to make sure it is sent and received by the receiver.
If you use Sendgrid to send emails, as recommended by Firebase (see https://github.com/firebase/functions-samples/tree/master/quickstarts/email-users), you can use Sendgrid's Events Webhooks, see https://sendgrid.com/docs/for-developers/tracking-events/event/#engagement-events and https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook/.
As explained in the last link above, "SendGrid's Event Webhook will notify a URL of your choice via HTTP POST with information about events that occur as SendGrid processes your email. "
You just have to setup an HTTP Cloud Function that will be called by Sendgrid for the events of your choice.

Amazon Simple Notification Service to http endpoint

I want to send message from Amazon Simple Notification Service(SNS) to the http endpoint. There is no proper solid documentation on how to do that. Though I had read Amazon SNS documentation still I could not get entire picture.
Can anyone give me simple example on how Amazon SNS and http endpoint work together?
There good documentation for what you asking: http://docs.aws.amazon.com/sns/latest/dg/sns-dg.pdf
Look at the page #147, it describes what steps you need to do for sending messages to HTTP(s) endpoint.
Also check this example which describes how to create topic, subscribe endpoint, confirm subscription and start to receive notification messages from SNS (uses Java SDK): https://github.com/mfine/AmazonSNSExample
General picture is:
On the publisher side:
create topic and subscribe some endpoint to receive messages. After subscribing endpoint to topic, the endpoint will receive SubscriptionConfirmation message.
start publish to topic so your endpoints will receive notification messages
On the subscriber side (your endpoint should be able to handle at least confirm subscription request and notification messages):
confirm subscription: make HTTP GET request to the "SubscribeURL" URL which comes inside the body of the confirm subscription request. Before you confirm subscription your endpoint will not receive any messages from SNS
receive notification messages and do what you want

What happens to existing messages in SQS when I add HTTP SNS subscription?

I have an existing SQS with X number of messages. I add new SNS HTTP subscription for it. Will my HTTP service receive all of the existing messages from the queue?
Thanks!
No only the new messages get sent.

Resources