Link Search Menu Expand Document Edit GitHub

Behavior State


The behavior-state command of the HiveMQ command line offers a set of commands to query the behavior validation state of currently connected MQTT clients using a HiveMQ Data Hub API endpoint.

NOTE: The HiveMQ Data Hub is a new product in the HiveMQ platform and commands using it may be subject to breaking changes in the future.

mqtt hivemq behavior-state

Commands

CommandExplanation
getSee Get Behavior State

Options

Help Options

OptionLong VersionExplanation
-h--helpDisplay help message for command.
-V--versionDisplay version information of the cli.

Get Behavior State


Retrieve a list of behavior states for a connected MQTT client for every behavior policy which currently applies to that client.

mqtt hivemq behavior-state get

Simple Example

$ mqtt hivemq behavior-state get --id my-client-id
{
  "items": [
    {
      "arguments": {},
      "behaviorId": "Mqtt.events",
      "firstSetAt": "2023-09-21T11:54:35.111Z",
      "policyId": "matchingOne",
      "stateName": "Connected",
      "stateType": "INTERMEDIATE",
      "variables": {}
    }
  ]
}

Options

OptionLong VersionExplanationRequired
-i--idThe id of the client to fetch.X

API Connection Options

OptionLong VersionExplanationDefault
-u--urlThe URL of the HiveMQ REST API endpoint.http://localhost:8888
-r--rateThe rate limit of the rest calls to the HiveMQ API endpoint in requests per second.1500

Logging Options

OptionLong VersionExplanationDefault
-l Log to ~./mqtt-cli/logs (Configurable through ~/.mqtt-cli/config.properties).false

Help Options

OptionLong VersionExplanation
-h--helpDisplay help message for command.
-V--versionDisplay version information of the cli.

ns.md %}