Just one step forward on this example... The culprit is "MQTTTopicPropertyName" exchange property which is set by MQTT consumer. MQTT producer send a message to the topic specified by this property if it exists and ignore the publishTopicName. It means publishTopicName is ignored if MQTT consumer exists in the route, then MQTT producer send a message to the topic which is subscribed by MQTT consumer. That's why this example went into infinite loop.
Now a message is published to the output topic through camel-mqtt producer, but I found ActiveMQ server delays 15 seconds to accept that PUBLISH message, whereas the PUBLISH message sent by the test code is accepted immediately. I saw the packet arrives at ActiveMQ mqtt port immediately with using tcpdump, but ActiveMQ doesn't respond until it passes 15 seconds. It seems like there's a timer or something. Here is a log including some trace log I added with Byteman. http://pastebin.com/d3wAq593 L136, L137: The test code send a PUBLISH and is immediately accepted by ActiveMQ L167, L168, L169: The camel-mqtt producer send a PUBLISH but it takes 15 seconds to be accepted by ActiveMQ Any comment would be highly appreciated. Thanks, Tomo -- IGARASHI Tomohisa mailto:tm.igara...@gmail.com On Tue, Aug 5, 2014 at 6:04 PM, Tomohisa Igarashi <tm.igara...@gmail.com> wrote: > Hi, > > I'm still struggling with camel-mqtt producer to get it working. This > is a previous thread: > http://camel.465427.n5.nabble.com/Dispatch-queue-mqtt-client-was-not-executing-error-from-camel-mqtt-producer-tp5753937.html > > I made an example which runs a standalone camel route to verify > camel-mqtt works as expected: > https://github.com/igarashitm/camel/tree/mqtt-consumer-producer-failure > https://github.com/igarashitm/camel/commit/24bdf5c7f8bac5763f2485591561773bba4e337f > > But it hits an another issue on producer side. A message is never > published to the output topic through the MQTT producer and it repeats > redeliveries without any error/warn message unless the testcase is > shut down. > > Am I doing something wrong in the testcase? If not, I'll file a JIRA > with this example. > > Thanks, > Tomo > -- > IGARASHI Tomohisa mailto:tm.igara...@gmail.com