In my application all the microservices are currently communicating via AWS FIFO queues.
I am currently trying to make all those queues subscribing an SNS topic with some filtering condition.
In the recent past (until March) the AWS documentation used to mention some compatibility issue with SNS. However, today this mention has been removed from the doc:
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-compatibility
My question is how to set up my SNS to pass one SNS message attribute as FIFO SQS message group id.
Do you have any clue/hint?
Thanks
Update:
As I mentioned in the original question, FIFO queues SNS subscription has been recently supported according to the doc (see above) and to the FAQ (see below):
Q: With which AWS or external services are Amazon SQS FIFO queues
compatible?
Some AWS or external services that send notifications to Amazon SQS
might not be compatible with FIFO queues, despite allowing you to set
a FIFO queue as a target.
The following features of AWS services aren't currently compatible
with FIFO queues:
Auto Scaling Lifecycle Hooks AWS IoT Rule Actions AWS Lambda Dead
Letter Queues
For information about compatibility of other services with FIFO
queues, see your service documentation.
https://aws.amazon.com/sqs/faqs/?nc1=f_ls
If you just Google it, you will find several articles and forum claiming that this did not work until ~6 months ago.
We’ve just released Amazon SNS FIFO topics. This should be helpful for your use case. But you can’t automatically turn a message attribute into a message group ID. You have to set both attributes independently. Check it out!
https://aws.amazon.com/about-aws/whats-new/2020/10/amazon-sns-introduces-fifo-topics-with-strict-ordering-and-deduplication-of-messages/
According to the AWS article Tutorial: Subscribing an Amazon SQS Queue to an Amazon SNS Topic see the following:
Note:
Amazon SNS isn't currently compatible with FIFO queues.
Also see the AWS Forum post FIFO queue subscribes to a SNS topic.
Related
I am not an expert on Solace, so apologies if my question is a primitive.
I have inherited a code base that I am looking to get to know more. It uses solace for messaging purposes. I see that the application publishes messages to a topic.
When I look up for this topic in solace UI I dont see the topic under the VPN.
Would topics in solace be created only if there are active subscribers?
I checked the logs of my application and they don't error out for the absence of the topic? What happens in case point 1 is true, and my application tries to send a message to solace when the topic hasnt been created.
I am using SolAdmin 7.1.1.158, is there way I can see my topic even if it does not have an active subscriber? Should that matter?
Thanks
I believe that you are confused about what is a topic.
Think of a topic as a concept of the publish-subscribe (pub/sub)
architectural pattern. They are used to route data or events (in the
form of messages) between distributed applications, often using a
message broker or an event broker.
Solace has a very detailed description of how topics work at https://solace.com/blog/solace-topics-vs-kafka-topics/.
Do note that topics are not the same as topic-endpoints.
Would topics in solace be created only if there are active subscribers?
Topics are only concepts and can't really be "created".
It is part of a message and used for routing messages. A application can also subscribe to a topic to receive messages that are published on a matching topic.
I checked the logs of my application and they don't error out for the absence of the topic? What happens in case point 1 is true, and my application tries to send a message to solace when the topic hasnt been created.
Publishers and consumers are decoupled when using the message broker.
When there are no subscribers to a topic, messages will be discarded and the "no subscription match" statistics and logs will increment.
If the publisher is sending guaranteed messages, you can enable the "Reject Msg To Sender On No Subscription Match" flag on it's client-profile to receive an negative acknowledgement when this occurs.
I am using SolAdmin 7.1.1.158, is there way I can see my topic even if it does not have an active subscriber? Should that matter?
Go to "Logging & Diagnostics" tab and select the "No Subscription Match Logs" view to take a look at the most recent messages that were dropped because there are no subscribers.
I am trying Google IOT and Google PubSub.
I am sending MQTT messages from device to a pubsub queue on which I have subribed (with something I will call "the server").
From the google cloud console, I update device setting and I get the setting message in device.
Everything in google tutorial work fine but I wonder if it is possible to set up a messaging it the other way : i.e. "the server" sending message to a pubsub queue subscribed by the device using MQTT.
The schema at the end of this page make me think that only the "config" mqtt queue (/devices/XXXX/config) can be used that way.
What I need is a 1to1 communication from "the server" to "the device" and I'm afraid that the only way is using the config
I am not an expert on Google IoT, but few days ago I got the same doubts about it. Apparently, although we can publish to /events, /config and /state topics, using MQTT protocol, only topic /config and, maybe, /state can work through subscriptions with the same protocol.
The conclusion I got, after reading many times the documentation, that is not so clear, and asking some questions here at stackoverflow is: you can not use MQTT to subscribe to any topic in order to receive those data sent to /events topic.
To accomplish this, you have to create a Pub/Sub topic associating it to your device:
On Google Cloud IoT Core Console, click on your registry ID;
Create a standard telemetry topic;
After topic created, click on the topic to see its details;
Its details will open on Google Cloud Pub/Sub panel;
In this panel, you can create a subscription to the created topic, by clicking on the "create subscription button".
Now that you have a "google cloud pub/sub topic" linked to "google cloud iot core /events telemetry MQTT topic" and a respective subscription, you can use the google pub/sub library to receive notifications through created subscription when data are sent to /events topic.
Maybe the following link can also help:
https://cloud.google.com/iot/docs/how-tos/devices#creating_a_device_registry_with_multiple_pubsub_topics
I hope this can help you. If I made any mistake in my answer, may someone edit it with some improvement or correction.
Today I got same issues. Seems you cannot get data by subscribe with MQTT. You need to create a pub/sub topic in Goolge iot pub.sub
I am looking for any sort of iPhone function for sending messages that can be accessed by an Alexa skill that is able to send SMS text messages, as well as read SMS text messages of a user. I know that these skills are already present, however, I am looking to do this in combination with numerous other features which I have already finished.
Any help would be much appreciated. Thanks!
Alex Skills normally run as Amazon Lambda functions. Lambda functions can call other AWS services (from the cloud, not from the phone).
Amazon SNS can send an SMS message. Here is an example using the AWS Command-Line Interface (CLI):
aws sns publish --phone-number +XXXX --message "Hello!"
However, if you are looking to send messages from the phone itself, or read messages that are already on the phone, then you will need to write an iPhone app than can use the iOS APIs to send/receive messages. This would not, however, be an 'Alex Skill' since it is running on the phone.
When I publish notification to specific endpoint from amazon console when device in offline mode.. after making device online notification not getting delivered.. is there any setting to make it possible..
Or as because sandbox not working?
Please help some one.
Finally I figure it out.. we have an option to integration application with amazon SQS using topic subscription using SQS service.. once topic created we just need bind topic to application event.
Amazon Web Services have an SDK for iOS which supports the Amazon Simple Notification Service (SNS).
Does this mean it would be possible to use SNS to send push notifications to a running iOS app? So for example you could make an real-time instant messaging app.
Is this right, or have I misunderstood what SNS does? It just seems to me that you would need to open a connection/socket in order to recieve push notifications from your server. How does the SDK actually work?
Update:
I've since asked this question on the AWS Mobile Development Forum: https://forums.aws.amazon.com/thread.jspa?threadID=81089&tstart=0
Apparently there is an article coming out (probably here: http://aws.amazon.com/articles/SDKs/iOS) shortly to explain everything.
Update 2
The article: http://aws.amazon.com/articles/9156883257507082
According to Apple documentation "Local notifications and push notifications are ways for an application that isn’t running in the foreground to let its users know it has information for them.".
So, technically speaking, any data, including notifications, received when the application is running in the foreground are not "Push Notifications" and can't be a reason for rejecting the application. They're simply data being consumed that way or the other by the application.
In this specific case you are not asking about Push Notifications per Apple's documentation, rather about a technology used to deliver data to the application when the application is running and user is interacting with it. It happens that the name Amazon SNS is similar to Push Notification.
In any case Apple wouldn't be able to see what is the technology behind delivering data to your application, whether it is Amazon SNS or anything else. All they can see is that the application may have some additional ports open when it's running, and that of course would be absolutely legal. In fact, many applications communicate with their back-end servers using sockets (not HTTP requests), and that is the same technology as used by Apple to deliver their Push Notifications.
According to the Amazon documentation, they in turn uses the APNS method and provide a much simpler frontend for Apple, Android and Kindle. A realtime instant messaging app could be considered as workable since by using the Amazon SNS platform, you could even consider the application to be available for all.
I mean by utilizing the Amazon SNS, the communication could be done between iOS and Android devices and to kindle also provided the applications are written accordingly. Though the Amazon documents do not provide a comprehensive example, there are bits and pieces. Also there is an upcoming event on the Aug 29 which could be seen from the Amazon SNS page.