Using the following link here install the WSL 2 on your windows 10.
VcXsrv seems to the best choice for X-Server in Windows
spring: | |
cloud: | |
stream: | |
bindings: | |
topic1: | |
destination: topic1 | |
contentType: application/json | |
group: process | |
binder: eventhub1 | |
consumer: |
package com.iot.edge.dto; | |
import com.fasterxml.jackson.annotation.JsonAnyGetter; | |
import com.fasterxml.jackson.annotation.JsonAnySetter; | |
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | |
import com.fasterxml.jackson.annotation.JsonInclude; | |
import java.util.HashMap; | |
import java.util.Map; |
spring: | |
cloud: | |
stream: | |
bindings: | |
input: | |
destination: amq.topic | |
binder: rabbitmqtt | |
group: sensor-consumer-group | |
output: | |
destination: iot.edge.topic |
package com.iot.edge.consumer; | |
import com.iot.edge.service.AssetService; | |
import com.iot.edge.dto.SensorData; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.cloud.stream.annotation.StreamListener; | |
import org.springframework.cloud.stream.messaging.Processor; | |
import org.springframework.messaging.support.MessageBuilder; | |
import org.springframework.stereotype.Component; |
package com.iot.edge.config; | |
import org.springframework.cloud.stream.annotation.EnableBinding; | |
import org.springframework.cloud.stream.messaging.Processor; | |
import org.springframework.context.annotation.Configuration; | |
@Configuration | |
@EnableBinding(Processor.class) | |
public class StreamConfig { | |
} |
mosquitto_pub -t /sensor -m "{"id":"1", "tenantId":"1", "token":"123", "timestamp":$(date +"%s000"), "temperature":10.0}" -u guest -P guest |
FROM rabbitmq:management | |
RUN rabbitmq-plugins enable --offline rabbitmq_mqtt | |
EXPOSE 15671 15672 1883 |