Questions tagged [spring-integration-mqtt]

34 questions
0
votes
1 answer

Spring Integration + MQTT parallelization

I wrote a Spring application using Integration flows that reads some MQTT messages and puts them in incomingMqttMessageChannel: @Bean public IntegrationFlow incomingMqttMessageFlow() { return…
0
votes
0 answers

MqttPahoMessageDrivenChannelAdapter: Lost connection: Connection lost; retrying

Please can someone why the Patho MQTT v3 Message Driven Adapter is continuously loosing connection when trying to subscribe to an HiveMQ 4.9 topic Versions…
0
votes
1 answer
0
votes
1 answer

MQTT Listener to listen to a topic and insert data to database on multiple instance pointing to same database

So I've made a chat application using Java Spring Boot and MQTT. I've made an MQTT listener which listens to all the messages under the abc topic (i.e. abc/#). For MQTT broker I'm using Amazon MQ. So what this application does is it listens to all…
0
votes
0 answers

Why getClientInstance is used for inbound and getAsyncClientInstance is used for outbound to get synchronous and asynchronous clients?

What if I use an asynchronous client for both outbound and inbound, I see that the code is private and there is no way to rewrite it this.client = this.clientFactory.getAsyncClientInstance(this.getUrl(), this.getClientId());
0
votes
1 answer

Connecting dockerized Spring boot app to MQTT Mosquitto broker

hope someone can help me with this issue. I have an app running with docker called "my-app". It connects to a MQTT Mosquitto broker which is also running in a docker container. Here is the docker-compose file: mosquitto: container_name:…
0
votes
1 answer
0
votes
2 answers

MQTT headers with Spring Integration

I'm using MQTT with Spring Integration. I would like to include a contentType header in the MQTT message. I'm writing to the MQTT broker in this way: @Bean public IntegrationFlow outgoingMqttMsgFlow() { return…
italktothewind
  • 1,950
  • 2
  • 28
  • 55
0
votes
0 answers

Spring Mqtt subscribe from the last read position

I am using spring integration Mqtt. Whenever I restart the app, it starts consuming the message from the 1st position. Is there any property to make app read from last read or current position. I couldn't find it. If there is not such a option then…
Ashish
  • 153
  • 1
  • 1
  • 11
0
votes
0 answers

Can I run MQTT broker inside a Spring boot app

Is it possible to have a mqqt broker like Mosquitto to run inside Spring boot application? Or any other mqqt broker? I found that eclipse paho library, which can be a client inside Spring boot app. I wonder if we have something similar for a mqqt…
Shehan Simen
  • 1,046
  • 1
  • 17
  • 28
0
votes
1 answer

What's the best way to handle reconnection with MqttPahoMessageHandler as token has now expired?

I have used the following example as a basis for my own code to publish to a MQTT server:…
0
votes
1 answer

Pausing and resuming MQTT Inbound Adapter

We have: a converter that takes the messages from mqtt topics, parses, processes those, and after specific validations sends them to the other messaging system. Should the target system be not reachable, we create a specific event and send this…
LHA
  • 37
  • 5
0
votes
2 answers

Google Cloud IoT Core Device registration- can multiple devices use the same Public/Private Key

I am working on an in house project with several sensor devices. I do not want a user to register each and every device individually. In the sense I want to use the same Public/Private Key pair for all devices registering to a registry but be able…
0
votes
1 answer

Can a MQTT Subscriber be able to take concurrently multiple messages of the Same Topic?

I am trying to create a Subscriber in my Spring Boot Application. My objective is that the publisher will send multiple messages to a topic and I have to get those message and process them .I noticed that the "handleMessage" of both Paho and Apache…
prashant s
  • 148
  • 1
  • 1
  • 9
0
votes
1 answer

SI subscription to multiple mqtt topics

I'm trying to learn how to handle MQTT Messages in Spring-Integration. Have created a converter, that subscribes with a single MqttPahoMessageDrivenChannelAdapter per MQTT Topic for consuming and converting the messages. The problem is our data…
LHA
  • 37
  • 5