spring-projects / spring-integration-samples

You are looking for examples, code snippets, sample applications for Spring Integration? This is the place.

Home Page:http://www.springsource.org/spring-integration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"hi sent to MQTT, received from MQTT", Message not received!

Mouli-Shankar opened this issue · comments

L114: "p + ", received from MQTT"" value p (sent message) is not recieved.

return IntegrationFlows.from(mqttInbound())
	.transform(p -> p + ", received from MQTT")
	.handle(logger())
	.get();

Output

12:53:09.415 [MQTT Call: siSampleConsumer] INFO  siSample - hi sent to MQTT, received from MQTT

Should be

12:53:09.415 [MQTT Call: siSampleConsumer] INFO  siSample - hi sent to MQTT, hi received from MQTT

??

.transform(p -> p + ", received from MQTT")

if p is "hi sent to MQTT` then what you are getting is completely what you should expect.

The sample is simply concatenating ", received from MQTT" to the inbound message. There is no logic to parse out the "hi" part.

Understood thanks for your explanation.