0

I am fairly new to the Aws IoT . I am aware that we can write the Java client for Aws IoT. I have below three queries:

  1. Is the Java Client used only to receive messages from the 'Thing' on Aws ?
  2. Can other devices subscribe to the Java Client
  3. Can this client also send messages to other devices

It will be helpful if you could help out with the starting point to implement the Java. References to any articles or links would really helpful.

TT.
  • 15,774
  • 6
  • 47
  • 88
heisenberg
  • 139
  • 1
  • 12
  • Asking for sample code and links is off topic for Stack Overflow – hardillb Oct 09 '17 at 05:40
  • 1
    what do you mean by `Can other devices subscribe to the Java Client` ? – gusto2 Oct 09 '17 at 07:14
  • You seem to be missing the concept of how Topics work in the AWS IoT service (or MQTT in general). Different clients/devices/whatever don't communicate directly with each other via the IoT service, they post messages to Topics and subscribe to Topics to receive messages that other things post to those topics. – Mark B Oct 09 '17 at 12:55
  • Thank you for the insights . I am fairly new to the concept so my questions might seem a little absurd . – heisenberg Oct 10 '17 at 03:20

1 Answers1

2

Is the Java Client used only to receive messages from the 'Thing' on Aws ?

Let's assume under the Java client we will understand the MQTT client. MQTT is a messaging protocol (most commonly used with AWS IoT - at least what I've seen). And you can consider the AWS IoT as a messaging hub.

So your client can subscribe for messages from things or queues to receive messages, but as well your client could send messages to the topics or things (topics reserved for things). All things or devices are effectively messaging clients for the IoT hub.

Can other devices subscribe to the Java Client

I don't full understand your question. So I'll be guessing that your question is about other clients or devices could receive messages from your application? (a device is just another client).

The clients can subsribe to their tpoic (representing a device or functionality). Your application can send a message (see point 1) to a topic for any device it wants.

Can this client also send messages to other devices

sending messages to other devices means sending messages to topics, to which the other devices are subscribed

help out with the starting point to implement the Java

You may check the Eclipse Paho project (MQTT client)

gusto2
  • 11,210
  • 2
  • 17
  • 36
  • Thank you very much . I have got a lot of clarity now with respect to the concept.One Question,If the Aws IoT thing publishes something with respect to the topic to which My client is subscribed and if my client is offline at that time . Will that published topic be missed . Is there any way the IoT thing keep track of which clients recieved the message? – heisenberg Oct 10 '17 at 03:24