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

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.

Related

How to track different conversation threads between 2 participants in twilio?

I have an application which uses Twilio to send SMSs.
There is a situation where the application sends multiple messages to a person, for example a message with info about product P1, then another message with information about product P2, and so on. So my question is, when the person replys the SMS, how could I know to exactly what SMS he is replying?
Or is it possible that each SMS that my application sends to the same person creates different conversations in Twilio, so I can track each response per each different SMS?, if so, how I can do it?
If you trigger the SMS messages by API it's hard to know what messages the customers answer.
We got to solve this problem using Twilio Sync (https://www.twilio.com/docs/sync/api/document-resource) which is basically cloud storage, so when we need to trigger an SMS or Whatsapp message, we save some information on Twilio Sync, like Twilio number, client number and the messages that were sent.
When the customer answers the message, we send him to a Twilio Studio that runs a Function that read the Sync document and check if this customer comes from a message response, if yes, we get the triggered message and added on the conversations, so we know the message that customer answered.
The Sync isn't a database and has a limit, so depending on your message volume, it can not work well.

AWS Iot no activity logged

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.

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

In MQTT, can i send a message to single client? Or only in a topic?

I have an application using MQTT, with clients connected on various topics, however, I have the need to send a message only to a client, not to an entire topic. Is that possible?
No, MQTT is a pub/sub protocol, messages are published on topics and there may be 0 to many subscribers to that topic
The closest you can do is pick a topic that you know only the client you want will be subscribed to.

How can I know, to which topic the arrived message belongs?

I am developing an App and I am using MQTT protocol supported by Paho library.
I am subscribing to 10 topics, and there will be a messgae(s) published for one at least one topic. now, when I get notified about the arrival of a new messae, how can i know to which topic it belongs?
Update:
The object that you get when the message arrives should have a destination field which will contain the topic.

Resources