Re: Problem in mqtt Component

2014-02-11 Thread Zadko
I am working on doing the exact same thing; consuming from a topic and
publishing to another. The consuming works fine however nothing gets
published. I was made aware of the following note of the doc 
http://camel.apache.org/mqtt.html http://camel.apache.org/mqtt.html  

Note: The component currently only supports polling (consuming) feeds.

It makes me wonder why the component would include a publishTopicName option
if it doesnt support publishing messages. I am doing some further digging on
this.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Problem-in-mqtt-Component-tp5733027p5747127.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Problem in mqtt Component

2014-02-11 Thread Robert Davies
The mqtt client does (or should) support publishing - the polling feeds is the 
type of consumption - a poll as opposed to asynchronous delivery from the 
underlying matt-client implementation
Could you raise a jira (with a test case) so we can track the issue ?

thanks,

Rob
On 11 Feb 2014, at 18:25, Zadko zaqavil...@gmail.com wrote:

 I am working on doing the exact same thing; consuming from a topic and
 publishing to another. The consuming works fine however nothing gets
 published. I was made aware of the following note of the doc 
 http://camel.apache.org/mqtt.html http://camel.apache.org/mqtt.html  
 
 Note: The component currently only supports polling (consuming) feeds.
 
 It makes me wonder why the component would include a publishTopicName option
 if it doesnt support publishing messages. I am doing some further digging on
 this.
 
 
 
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Problem-in-mqtt-Component-tp5733027p5747127.html
 Sent from the Camel - Users mailing list archive at Nabble.com.

Rob Davies

Red Hat, Inc
Twitter: rajdavies
Blog: http://rajdavies.blogspot.com
ActiveMQ in Action: http://www.manning.com/snyder/



Problem in mqtt Component

2013-05-23 Thread Jinesh M.K
Hi,

I have some problem with mqtt end point using spring DSL. Here my route
definition



camel:route
camel:from
uri=mqtt:foo?host=tcp://myhost:1883amp;subscribeTopicName=test/# /
camel:to
uri=mqtt:bar?host=tcp:/myhost:1883amp;publishTopicName=test1/test /
camel:log message=Message processed /
/camel:route

Using this route definition, the program taking long time to print the log
message and nothing is published under test1/test topic. If I remove any
one the mqtt route. It will works fine. For example

  camel:route
camel:from
uri=mqtt:foo?host=tcp://myhost:1883amp;subscribeTopicName=test/# /
camel:to uri=file:/myhome/test /
camel:log message=Message processed /
/camel:route

or

  camel:route
camel:from uri=file:/myhome/test /
camel:to
uri=mqtt:bar?host=tcp:/myhost:1883amp;publishTopicName=test1/test /
camel:log message=Message processed /
/camel:route

Both these condition works fine. Problem only using mqtt in from and to
route.

Any idea about it?

Thanks in advance
-- 
Jinesh M.K
 mkjin...@gmail.com


Re: Problem in mqtt Component

2013-05-23 Thread Robert Davies
Hi Jinesh,

which MQTT broker are you running and which version ? It looks like the client 
isn't able to connect for some reason.
Also - which version of Apache Camel are you using ?

thanks,

Rob

On 23 May 2013, at 13:42, Jinesh M.K mkjin...@gmail.com wrote:

 Hi,
 
 I have some problem with mqtt end point using spring DSL. Here my route
 definition
 
 
 
camel:route
camel:from
 uri=mqtt:foo?host=tcp://myhost:1883amp;subscribeTopicName=test/# /
camel:to
 uri=mqtt:bar?host=tcp:/myhost:1883amp;publishTopicName=test1/test /
camel:log message=Message processed /
/camel:route
 
 Using this route definition, the program taking long time to print the log
 message and nothing is published under test1/test topic. If I remove any
 one the mqtt route. It will works fine. For example
 
  camel:route
camel:from
 uri=mqtt:foo?host=tcp://myhost:1883amp;subscribeTopicName=test/# /
camel:to uri=file:/myhome/test /
camel:log message=Message processed /
/camel:route
 
 or
 
  camel:route
camel:from uri=file:/myhome/test /
camel:to
 uri=mqtt:bar?host=tcp:/myhost:1883amp;publishTopicName=test1/test /
camel:log message=Message processed /
/camel:route
 
 Both these condition works fine. Problem only using mqtt in from and to
 route.
 
 Any idea about it?
 
 Thanks in advance
 -- 
 Jinesh M.K
 mkjin...@gmail.com



Problem in mqtt Component

2013-05-23 Thread Jinesh M.K
Hi,

I have some problem with mqtt end point using spring DSL. Here my route
definition



camel:route
camel:from
uri=mqtt:foo?host=tcp://myhost:1883amp;subscribeTopicName=test/# /
camel:to
uri=mqtt:bar?host=tcp:/myhost:1883amp;publishTopicName=test1/test /
camel:log message=Message processed /
/camel:route

Using this route definition, the program taking long time to print the log
message and nothing is published under test1/test topic. If I remove any
one the mqtt route. It will works fine. For example

  camel:route
camel:from
uri=mqtt:foo?host=tcp://myhost:1883amp;subscribeTopicName=test/# /
camel:to uri=file:/myhome/test /
camel:log message=Message processed /
/camel:route

or

  camel:route
camel:from uri=file:/myhome/test /
camel:to
uri=mqtt:bar?host=tcp:/myhost:1883amp;publishTopicName=test1/test /
camel:log message=Message processed /
/camel:route

Both these condition works fine. Problem only using mqtt in from and to
route.

Any idea about it?

Thanks in advance
-- 
Jinesh M.K
 mkjin...@gmail.com


Re: Problem in mqtt Component

2013-05-23 Thread Willem jiang
Hi  

Did you push some message to the topic which the route is subscribed?
Can you add some log between your first route from and to endpoints?


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Thursday, May 23, 2013 at 11:34 PM, Jinesh M.K wrote:

 Hi,
  
 I have some problem with mqtt end point using spring DSL. Here my route
 definition
  
  
  
 camel:route
 camel:from
 uri=mqtt:foo?host=tcp://myhost:1883amp;subscribeTopicName=test/# /
 camel:to
 uri=mqtt:bar?host=tcp:/myhost:1883amp;publishTopicName=test1/test /
 camel:log message=Message processed /
 /camel:route
  
 Using this route definition, the program taking long time to print the log
 message and nothing is published under test1/test topic. If I remove any
 one the mqtt route. It will works fine. For example
  
 camel:route
 camel:from
 uri=mqtt:foo?host=tcp://myhost:1883amp;subscribeTopicName=test/# /
 camel:to uri=file:/myhome/test /
 camel:log message=Message processed /
 /camel:route
  
 or
  
 camel:route
 camel:from uri=file:/myhome/test /
 camel:to
 uri=mqtt:bar?host=tcp:/myhost:1883amp;publishTopicName=test1/test /
 camel:log message=Message processed /
 /camel:route
  
 Both these condition works fine. Problem only using mqtt in from and to
 route.
  
 Any idea about it?
  
 Thanks in advance
 --  
 Jinesh M.K
 mkjin...@gmail.com (mailto:mkjin...@gmail.com)





Re: Problem in mqtt Component

2013-05-23 Thread Jinesh M.K
Hi Jiang,

Thanks for rthe eply

On 24 May 2013 07:38, Willem jiang willem.ji...@gmail.com wrote:

 Hi

 Did you push some message to the topic which the route is subscribed?


Yes, using some Java MQTT client

Can you add some log between your first route from and to endpoints?


I done like this
camel:route
camel:from
uri=mqtt:foo?host=tcp://myhost:1883amp;subscribeTopicName=test/# /
   camel:log message=Message Arrived /
camel:to
uri=mqtt:bar?host=tcp://myhost:1883amp;publishTopicName=test1/test /
camel:log message=Message processed /
  /camel:route

In this case 'Message Arrived' print immediately when the message pushed
from a java MQTT publisher,, but Message processed take long time to
print and publisher is not working.(I tried it with some Java MQTT
subscriber)




 --
 Willem Jiang

 Red Hat, Inc.
 FuseSource is now part of Red Hat
 Web: http://www.fusesource.com | http://www.redhat.com
 Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/)
 (English)
   http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
 Twitter: willemjiang
 Weibo: 姜宁willem





 On Thursday, May 23, 2013 at 11:34 PM, Jinesh M.K wrote:

  Hi,
 
  I have some problem with mqtt end point using spring DSL. Here my route
  definition
 
 
 
  camel:route
  camel:from
  uri=mqtt:foo?host=tcp://myhost:1883amp;subscribeTopicName=test/# /
  camel:to
  uri=mqtt:bar?host=tcp:/myhost:1883amp;publishTopicName=test1/test /
  camel:log message=Message processed /
  /camel:route
 
  Using this route definition, the program taking long time to print the
 log
  message and nothing is published under test1/test topic. If I remove any
  one the mqtt route. It will works fine. For example
 
  camel:route
  camel:from
  uri=mqtt:foo?host=tcp://myhost:1883amp;subscribeTopicName=test/# /
  camel:to uri=file:/myhome/test /
  camel:log message=Message processed /
  /camel:route
 
  or
 
  camel:route
  camel:from uri=file:/myhome/test /
  camel:to
  uri=mqtt:bar?host=tcp:/myhost:1883amp;publishTopicName=test1/test /
  camel:log message=Message processed /
  /camel:route
 
  Both these condition works fine. Problem only using mqtt in from and to
  route.
 
  Any idea about it?
 
  Thanks in advance
  --
  Jinesh M.K
  mkjin...@gmail.com (mailto:mkjin...@gmail.com)






-- 
Jinesh M.K
Research Associate
Amrita Center for Cyber Security | Amrita Vishwa Vidyapeetham
(+91) 9400466629 | 0476 2804530
http://jinutechworld.blogspot.com | mkjin...@gmail.com


Re: Problem with mqtt component

2013-03-26 Thread Willem jiang
Hi,

Can you show us the code of the myProcessor?
I just checked the code of camel-mqtt producer, it will to send the message to 
mqtt server unless the it can get the byte array from the message body.
Please make sure the message body is reread able.


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Tuesday, March 26, 2013 at 9:33 AM, arda.aydin wrote:

 Hi everyone,
  
 I have a from(mqtt).to(mqtt) route but i can't get it work. Here are my
 route definitions:
  
 camel:route id=orderRequestCreatorRoute  
 camel:from uri=mqtt:cheese?subscribeTopicName=CP/#/  
 camel:process ref=myProcessor/
 camel:to uri=mqtt:cheese?publishTopicName=DP/Device1/
 /camel:route  
  
 This doesn't work, the processor prints a log message but i can't consume on
 DP/Device1 topic. But when i replace the consumer by a file endpoint it
 works :  
  
 camel:route id=orderRequestCreatorRoute  
 camel:from uri=file://inbox/  
 camel:process ref=myProcessor/
 camel:to uri=mqtt:cheese?publishTopicName=DP/Device1/
 /camel:route  
  
 Does someone has an idea about it?
 Thanks in advance.
  
 Cheers,
 Kod
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Problem-with-mqtt-component-tp5729820.html
 Sent from the Camel - Users mailing list archive at Nabble.com 
 (http://Nabble.com).





Re: Problem with mqtt component

2013-03-26 Thread arda.aydin
Hi,

Even if i delete the processor it doesn't work. And now with your warning i
make this:

byte[] ba2 = {1,2,3,4,5};
exchange.getIn().setBody(ba2);

inside my processor but i doesn't work.

Camel version : 2.10.4

Thanks for your reply,
Kod



--
View this message in context: 
http://camel.465427.n5.nabble.com/Problem-with-mqtt-component-tp5729820p5729842.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Problem with mqtt component

2013-03-25 Thread arda.aydin
Hi everyone,

I have a  from(mqtt).to(mqtt) route but i can't get it work. Here are my
route definitions:

camel:route id=orderRequestCreatorRoute 
camel:from uri=mqtt:cheese?subscribeTopicName=CP/#/ 
camel:process ref=myProcessor/
camel:to uri=mqtt:cheese?publishTopicName=DP/Device1/
/camel:route 

This doesn't work, the processor prints a log message but i can't consume on
DP/Device1 topic. But when i replace the consumer by a file endpoint it
works : 

camel:route id=orderRequestCreatorRoute 
camel:from uri=file://inbox/ 
camel:process ref=myProcessor/
camel:to uri=mqtt:cheese?publishTopicName=DP/Device1/
/camel:route 

Does someone has an idea about it?
Thanks in advance.

Cheers,
Kod



--
View this message in context: 
http://camel.465427.n5.nabble.com/Problem-with-mqtt-component-tp5729820.html
Sent from the Camel - Users mailing list archive at Nabble.com.