AWS Iot no activity logged - iot

I am trying to find the connected devices and according to the forums and was advised to subscribe to "$aws/events/presence/+".
I have created two clients where one subscribes to the "$aws/events/presence/+" topic and the other one sends the connect command.
I could not see any activity under the tab.
Could you please help me to resolve this?

There is a subtopic to the presence topic that you need to consider by either adding the subtopic or using the multi-level topic wildcard (# instead of +). This means you need to subscribe to $aws/events/presence/connected/+ (or $aws/events/presence/# to monitor both connections and disconnections).
This accounts for the connected and disconnected subtopics on the reserved topics $aws/events/presence/connected/clientId and $aws/events/presence/disconnected/clientId.

Related

Would solace topic be created only if it has an active subscriber?

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.

Should I create general MQTT topic for all devices?

I try to design the topic structure for manage devices in factory
Should I create only one general topic and all devices need subscribe to. With this way, we must do some filter at device code to receive exactly message

Google IOT - device subscribe to something else than /devices/XXXX/config

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

Topic Subscription for Durable Queues

I wanted to configure a durable queue in one VPN to subscribe to topics from different VPNs. Is it possible to do so? What is the topic expression syntax to refer to topics from other VPNs?
You will need a VPN bridge to bridge messages from one VPN to another.
The purpose of VPNs is to segregate applications into separate messaging domains. Therefore, messages published onto a VPN cannot be seen by another.
A message VPN bridge allows for the delivery of messages that match an explicit set of topic subscriptions from a remote Message VPN to a local Message VPN.
Please refer to the Solace documentation for a full description of how VPN bridges work, and how to configure them.
https://sftp.solacesystems.com/Portal_Docs/#page/Solace_Messaging_Platform_Feature_Guide/Working_With_Message_VPN_Bridges.html#

send a word device to device on wifi direct android using a service

We required to send a word from one mobile device to another using wifi-direct. The wifi-direct, wifi-discoveryservice samples given in android sdk shows its usage with MainActivity. As we have app with multiple activities and from selected activities we need to send particular word to another device on wifi, we are looking for a simple 'SendWordWiFiService' approach.
Any related input in this regard is awaited. We are struggling for last 1 week trying to implement wifi-direct, wifi-discoveryservice in a project having multiple activities. But no success.
You need to use Sockets. If you haven't done them before, I suggest reading this as it got me started. Additionally you might find Oracle's documentation to be useful. In particular, you may want to read up on of using threads to run server sockets.
The steps you need to take are:
Discover peers using Wi-Fi Direct
Make a peer connection between decies (NB: Be mindful of who the group owner is once this is done, if you're application needs to differentiate between a group owner and a group client(s)).
Once the peer connection is made, sockets can be set up between the peers for the transfer of data streams, ie sending words in your case. You might find it most logical to set your Wi-Fi Direct GroupOwner as the server socket, and your GroupClient devices as a client which connects to the server.
I hope that helps.

Resources