250+ TOP MCQs on Publishing Messages with Commands and Answers

IOT Multiple Choice Questions on “Publishing Messages with Commands”.

1. What is the java extension file in IoT?
a) .jar
b) .c
c) .exe
d) .py

Answer: a
Clarification: Java IDE to run the example in any computer or build .jar file with all the dependencies included and launch it any computer or devices that you want to use as the MQTT client with a command similar to the following line.

2. Do we run our program in the same computer where we have written?
a) True
b) False
c) May or may not
d) Cannot be determined

Answer: c
Clarification: In case you don’t run the example in the same computer in which you are running the MQTT server, remember to change the value for the mqttServerHost string in the main method of the Main class.

3. Publish command message is sent from _________
a) Only publisher to broker
b) Only broker to publisher
c) Publisher to broker and broker to publisher
d) Server to client

Answer: c
Clarification: The public command message is sent from a publisher to a broker or from a broker to a subscriber, to publish information on a specified topic or topics.

4. The message is sent to the input queue of a message flow that contains a _________
a) Subscriber
b) Server
c) Publication node
d) Client

Answer: d
Clarification: Message is sent to the input queue of a message flow that contains a publishing node. Authority to put a message into the queue and to publish on the specified topic.

5. Does user has authority for all topics.
a) True
b) False

Answer: b
Clarification: If the user has no authority on topic a warning response will come which indicates which are not published, if not those topics are published.

6. ROSTOPIC uses _________ at the command line for representing the content of the message.
a) YAML_syntax
b) rostopic bw
c) rostopic delay
d) rostopic echo

Answer: a
Clarification: ROSTOPIC uses YAML_syntax at the command line for representing the content of the message. For information on how to use this YAML syntax for commands like rostopic pub.

7. Which command displays the band width?
a) rostopic hz
b) rostopic delay
c) rostopic echo
d) rostopic bw

Answer: d
Clarification: Rostopic bw displays the bandwidth. The bandwidth reported is the received bandwidth. If there are network connectivity issues or rostopic cannot keep up with the publisher.

8. rostopic delay will provide delay for ___________
a) Topics which has header
b) Topics which has tail
c) Topics which has tail and head
d) To all topics

Answer: a
Clarification: Rostopic delay display the delay for topic which has header. Rostopic is implemented in python.

9. Which command displays messages published to a topic?
a) rostopic bw
b) rostopic delay
c) rostopic echo
d) rostopic hz

Answer: c
Clarification: Rostopic echo displays messages published to a topic. Rostopic is implemented in python.

10. Which command finds out the topic?
a) rostopic bw
b) rostopic delay
c) rostopic echo
d) rostopic find

Answer: d
Clarification: Rostopic find, finds topics by type. Rostopic is implemented in python. ROSTOPIC uses YAML_syntax at the command line

Leave a Reply

Your email address will not be published. Required fields are marked *