For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

EMQPUBCLOSE – remove a publish message topic

Remove a publish message topic.

Type
Syntax
Returned Result

Test

AT+EMQPUBCLOSE=?

OK

+EMQPUBCLOSE:(0-7)

Read

AT+EMQPUBCLOSE?

OK

or

ERROR

Write

AT+EMQPUBCLOSE=(0-7)

where:

(0-7) is a publish index number in the range from 0, up to and including 7. You must have already published a topic to the selected index number, or the command will return an error.

OK

+EMQPUBCLOSE:(0-7),<status>

where:

  • (0-7) is the publish index number you selected from the range

  • status is either:

    • 0 – subscription cancelled successfully

    • -2 – no topic was registered for the given index

or

ERROR – the command failed

Example

AT+EMQPUBCLOSE=0
OK

+EMQPUBCLOSE: 0,0

Last updated

Was this helpful?