Encodes an UNSUBSCRIBE packet.
Begins with the packet identifier, then a list of topic filters to remove. The fixed-header flags nibble is the spec-mandated 0x2.
0x2
A non-zero packet identifier the matching UNSUBACK will echo.
One or more topic filters to unsubscribe from.
The UNSUBSCRIBE bytes.
If no topic filters are supplied.
1.0.0
import { encodeUnsubscribe } from 'edgeport/mqtt';const bytes = encodeUnsubscribe(2, ['sensors/+/temp']); Copy
import { encodeUnsubscribe } from 'edgeport/mqtt';const bytes = encodeUnsubscribe(2, ['sensors/+/temp']);
Encodes an UNSUBSCRIBE packet.
Begins with the packet identifier, then a list of topic filters to remove. The fixed-header flags nibble is the spec-mandated
0x2.