简体   繁体   中英

Java Client for MQTT using AWS IoT

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.

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM