Questions tagged [spring-integration-mqtt]

34 questions
5
votes
1 answer

Sending messages to different topics using spring integration gateway

I am trying to use spring integration for send mqtt messages to a broker and I am trying to use the gateway interface. @Bean public MqttPahoClientFactory mqttClientFactory() { DefaultMqttPahoClientFactory factory = new…
3
votes
0 answers

Sharing same MQTT Client instance between MqttPahoMessageHandler and MqttPahoMessageDrivenChannelAdapter in Spring Boot Integration

Suppose that I have a single Spring Boot application that needs to instantiate several MQTT clients (# ~10^4) to virtualize physical devices into a broker (Mosquitto). Each of them has a unique client ID, in order to get/send messages from/to…
iakko
  • 508
  • 2
  • 5
  • 18
3
votes
1 answer

spring-integration-mqtt With multiple Mqtt Servers for subscription

I am using Spring's spring-integration-mqtt and i can connect to a single Mqtt server and can receive messages on subscribed topics , and now i want to make application which can connect to multiple Mqtt Servers and can receive data from every…
Rawat
  • 461
  • 3
  • 6
  • 23
2
votes
1 answer

Use Paho under Spring Integration to receive binary MQTT message

I have this code that receives MQTT messages under Spring Integration 5.0.x / Boot 2.0. It works fine for text messages, but when I try to process binary messages it fails because a conversion to String happens and this corrupts the content (in this…
Marged
  • 10,577
  • 10
  • 57
  • 99
1
vote
1 answer

MQTT - how to prevent yourself from receiving your very own published message?

Okay, this may be a really stupid question but here's the deal. My IoT device is subscribed to topic "Weather/Humidity". The device publishes real time humidity data to the broker. No problem there. Thing is, it also receives other devices which…
cream_pi
  • 23
  • 4
1
vote
1 answer

I encountered an error while using MQTT in my project: Unable to register MBean

I want to use MQTT in my project, but when I followed the instructions on https://docs.spring.io/spring-integration/reference/html/mqtt.html#mqtt-shared-client, I encountered this error. Can someone help me, please? @Bean public…
1
vote
0 answers

Shared Subscription with Spring Integration Mqttv5 not Receiving Messages

I have a spring boot (v. 3.0.5) project using spring-integration-mqtt (v. 6.0.4) and also use paho mqttv5 client. I want to setup a shared subscription via the ClientManager and the Integration DSL. But I cannot get it to work. @Bean fun…
1
vote
1 answer

Spring Integration MQTT - Not re-subscribing after reconnect

After the MQTTv5 client is reconnected successfully, it does not re-subscribe to the topics. I am unable to retrieve messages unless I reboot my application. Spring Boot version: 3.0.2 MQTT integration version: 6.0.2 Here is the sample I am…
1
vote
0 answers

How do I want to create multiple ClientId with Spring-Integration-MQTT and produce messages?

@EnableIntegration @Configuration @ConfigurationProperties(prefix = "mqtt") @IntegrationComponentScan(basePackages = "org.sample.mqtt") public class MqttConfig { private String[] serverUris; private String username; private char[]…
mkt
  • 11
  • 2
1
vote
1 answer

spring-integration-mqtt failed to start app when the network is disconnected

Config @Configuration @IntegrationComponentScan public class MqttV5ChannelConfig { @Bean public MqttConnectionOptions getMqttConnectionOptions() throws Exception { MqttConnectionOptions options = new MqttConnectionOptions(); …
1
vote
1 answer

MQTT and SpringBoot Integration Connection Lost

I currently have an API in SpringBoot and I would like to add an MQTT client to subscribe to one or more topics. I tried several Paho,Hive clients, without success, I'm currently on the default MQTT of SpringBoot which uses Paho but I can't get it…
Kévin
  • 497
  • 10
  • 37
1
vote
0 answers

Scaling MQTT-consumer for many publishers

I am new in Spring-Integration, and lloking to the solution of the following task. We try to create an MQTT-Consumer ( based on the mqtt inbound channel adapter), which recieves messages on 7 topics from up to 50 publishers. As the adapter…
1
vote
1 answer

Spring Integration: MQTT integration test basics

I try to test a simple MQTT listener created with Spring Boot and Spring Integration, but don't get it working. I've tried many approaches. The most promising was: @RunWith(SpringRunner.class) @SpringBootTest public class BasicMqttTest…
1
vote
0 answers

solution of mqttlens auto zoom in windows 8.1

I have installed mqttlens from google chorme apps. It worked quite well for a couple of week, but recently it appears in zoom when I start it. How can I fix it? .
0
votes
0 answers

MQTT and Spring Boot Integration - When Connection lost

I am trying to using Spring MQTT Integration to build a client that is subscribe to MQTT broker. The code works as expected, no issues. I am struggling configuring it so that when the connection is lost, it subscribes automatically. What is…
tjxob
  • 19
  • 6
1
2 3