Unable to Receive Device Events in Java MQTT Client

Hi everyone,

I’ve installed ChirpStack using Docker, and currently, I have the following containers running:

  • chirp-stack-chirpstack-rest-api-1
  • chirp-stack-chirpstack-gateway-bridge-basicstation-1
  • chirp-stack-chirpstack-1
  • chirp-stack-chirpstack-gateway-bridge-1
  • chirp-stack-postgres-1
  • chirp-stack-redis-1
  • chirp-stack-mosquitto-1

I have one gateway configured with three devices. From the ChirpStack web panel, I can see the events arriving and the data they carry. My configuration files include:
chirpstack-gateway-bridge.toml :

[integration.mqtt.auth.generic]
servers=["tcp://mosquitto:1883"]
username=""
password=""

[integration.mqtt]
event_topic_template="au915_1/gateway/{{ .GatewayID }}/event/{{ .EventType }}"
state_topic_template="au915_1/gateway/{{ .GatewayID }}/state/{{ .StateType }}"
command_topic_template="au915_1/gateway/{{ .GatewayID }}/command/#"

With this default configuration, I assumed it would be set up to publish the arriving events to MQTT. However, in my Java MQTT implementation, I cannot see the device events. My client seems to be working fine since it reads messages from the queue when I publish a message using mosquitto_pub.

I also considered DNS issues due to the “mosquitto” hostname, so I updated the host file on the machine, but I still cannot see the messages from my devices in the client.

Has anyone experienced a similar issue or have any suggestions on how to resolve this?

Thank you!

Im a little confused by your goal here. Are you just trying to see the MQTT messages Chirpstack uses internally?

What do you mean by “Java MQTT implementation”?

What topic are you using to subscribe to the broker?

Have you enabled TLS on your MQTT broker?

You subscribe to the incorrect topic.The topic is for gateways.
If you want device events, you should subscribe to the below topic instead.
https://www.chirpstack.io/docs/chirpstack/integrations/mqtt.html

I believe he is referencing his gateway bridge configuration file, so the gateway topics are correct.

Thank you all for your responses. As @datnus mentioned, it was a topic issue. Subscribing to the application topic worked for me: MQTT - ChirpStack open-source LoRaWAN® Network Server documentation

This topic was automatically closed after 90 days. New replies are no longer allowed.