You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Carlo Simeone <re...@simeosoft.com> on 2014/05/20 13:20:45 UTC
MQTT component topic header missing
Hi,
I'm using the Camel MQTT component with the following
uri (from karaf route-show):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<route id="route4" xmlns="http://camel.apache.org/schema/spring">
<from
uri="mqtt:testmqtt?host=tcp://localhost:1883&mqttTopicPropertyName=pippo&subscribeTopicName=topic/#"/>
<to uri="activemq:events" id="to2"/>
</route>
in the JMS message there's no sign of the original topic. Assuming
is "topic/a/b" I was expecting some header showing the topic.
I got only (from the Hawtio browsing tab):
Header Value
Header - JMSCorrelationID
Header - JMSDeliveryMode PERSISTENT
Header - JMSDestination queue://events
Header - JMSExpiration 0
Header - JMSMessageID ID:lenovo-50831-1400580839684-6:2:1:1:1
Header - JMSPriority 4
Header - JMSRedelivered false
Header - JMSReplyTo
Header - JMSTimestamp 2014-05-20T12:46:49+02:00
Header - JMSType
Header - JMSXGroupID
Header - JMSXGroupSeq 0
Header - JMSXUserID
Header - BodyLength 896
Header - BrokerPath null
Header - OriginalDestination
String Property - breadcrumbId ID-lenovo-35129-1400580848377-4-3
I was expecting something like:
Header - pippo topic/a/b
Reading the docs it seems TopicPropertyName is used only by a MQTT producer
(http://camel.apache.org/mqtt.html -> mqttTopicPropertyName)
TIA
Re: MQTT component topic header missing
Posted by Carlo Simeone <c....@simeosoft.com>.
Thanks Claus,
patch uploaded on JIRA...
Il 29/05/2014 15:28, Claus Ibsen ha scritto:
> Hi
>
> I logged a ticket to not forget about this
> https://issues.apache.org/jira/browse/CAMEL-7473
>
> On Thu, May 22, 2014 at 3:48 PM, Claus Ibsen <cl...@gmail.com> wrote:
>> Hi
>>
>> Yeah we should maybe add a header to the Camel message from the
>> MqttConsumer with the topic destination name from MQTT. Fell free to
>> log a JIRA ticket.
>>
>> MQTTDestination or something could be the header name.
>>
>>
>>
>> On Tue, May 20, 2014 at 1:20 PM, Carlo Simeone <re...@simeosoft.com> wrote:
>>> Hi,
>>> I'm using the Camel MQTT component with the following
>>> uri (from karaf route-show):
>>>
>>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
>>> <route id="route4" xmlns="http://camel.apache.org/schema/spring">
>>> <from
>>> uri="mqtt:testmqtt?host=tcp://localhost:1883&mqttTopicPropertyName=pippo&subscribeTopicName=topic/#"/>
>>> <to uri="activemq:events" id="to2"/>
>>> </route>
>>>
>>> in the JMS message there's no sign of the original topic. Assuming
>>> is "topic/a/b" I was expecting some header showing the topic.
>>>
>>> I got only (from the Hawtio browsing tab):
>>>
>>> Header Value
>>> Header - JMSCorrelationID
>>> Header - JMSDeliveryMode PERSISTENT
>>> Header - JMSDestination queue://events
>>> Header - JMSExpiration 0
>>> Header - JMSMessageID ID:lenovo-50831-1400580839684-6:2:1:1:1
>>> Header - JMSPriority 4
>>> Header - JMSRedelivered false
>>> Header - JMSReplyTo
>>> Header - JMSTimestamp 2014-05-20T12:46:49+02:00
>>> Header - JMSType
>>> Header - JMSXGroupID
>>> Header - JMSXGroupSeq 0
>>> Header - JMSXUserID
>>> Header - BodyLength 896
>>> Header - BrokerPath null
>>> Header - OriginalDestination
>>> String Property - breadcrumbId ID-lenovo-35129-1400580848377-4-3
>>>
>>>
>>> I was expecting something like:
>>> Header - pippo topic/a/b
>>>
>>> Reading the docs it seems TopicPropertyName is used only by a MQTT producer
>>> (http://camel.apache.org/mqtt.html -> mqttTopicPropertyName)
>>>
>>>
>>>
>>> TIA
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> Email: cibsen@redhat.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>> hawtio: http://hawt.io/
>> fabric8: http://fabric8.io/
>
>
--
------------------------------------------------------------------------
Simeosoft di Carlo Simeone
Via Scrima, 136
60126 Ancona IT
tel: 071 2141001
mob: 348 8712861
Linkedin <http://it.linkedin.com/in/carlosimeone>
Google+ <https://plus.google.com/+CarloSimeone>
Re: MQTT component topic header missing
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
I logged a ticket to not forget about this
https://issues.apache.org/jira/browse/CAMEL-7473
On Thu, May 22, 2014 at 3:48 PM, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> Yeah we should maybe add a header to the Camel message from the
> MqttConsumer with the topic destination name from MQTT. Fell free to
> log a JIRA ticket.
>
> MQTTDestination or something could be the header name.
>
>
>
> On Tue, May 20, 2014 at 1:20 PM, Carlo Simeone <re...@simeosoft.com> wrote:
>> Hi,
>> I'm using the Camel MQTT component with the following
>> uri (from karaf route-show):
>>
>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
>> <route id="route4" xmlns="http://camel.apache.org/schema/spring">
>> <from
>> uri="mqtt:testmqtt?host=tcp://localhost:1883&mqttTopicPropertyName=pippo&subscribeTopicName=topic/#"/>
>> <to uri="activemq:events" id="to2"/>
>> </route>
>>
>> in the JMS message there's no sign of the original topic. Assuming
>> is "topic/a/b" I was expecting some header showing the topic.
>>
>> I got only (from the Hawtio browsing tab):
>>
>> Header Value
>> Header - JMSCorrelationID
>> Header - JMSDeliveryMode PERSISTENT
>> Header - JMSDestination queue://events
>> Header - JMSExpiration 0
>> Header - JMSMessageID ID:lenovo-50831-1400580839684-6:2:1:1:1
>> Header - JMSPriority 4
>> Header - JMSRedelivered false
>> Header - JMSReplyTo
>> Header - JMSTimestamp 2014-05-20T12:46:49+02:00
>> Header - JMSType
>> Header - JMSXGroupID
>> Header - JMSXGroupSeq 0
>> Header - JMSXUserID
>> Header - BodyLength 896
>> Header - BrokerPath null
>> Header - OriginalDestination
>> String Property - breadcrumbId ID-lenovo-35129-1400580848377-4-3
>>
>>
>> I was expecting something like:
>> Header - pippo topic/a/b
>>
>> Reading the docs it seems TopicPropertyName is used only by a MQTT producer
>> (http://camel.apache.org/mqtt.html -> mqttTopicPropertyName)
>>
>>
>>
>> TIA
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/
--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/
Re: MQTT component topic header missing
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Yeah we should maybe add a header to the Camel message from the
MqttConsumer with the topic destination name from MQTT. Fell free to
log a JIRA ticket.
MQTTDestination or something could be the header name.
On Tue, May 20, 2014 at 1:20 PM, Carlo Simeone <re...@simeosoft.com> wrote:
> Hi,
> I'm using the Camel MQTT component with the following
> uri (from karaf route-show):
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <route id="route4" xmlns="http://camel.apache.org/schema/spring">
> <from
> uri="mqtt:testmqtt?host=tcp://localhost:1883&mqttTopicPropertyName=pippo&subscribeTopicName=topic/#"/>
> <to uri="activemq:events" id="to2"/>
> </route>
>
> in the JMS message there's no sign of the original topic. Assuming
> is "topic/a/b" I was expecting some header showing the topic.
>
> I got only (from the Hawtio browsing tab):
>
> Header Value
> Header - JMSCorrelationID
> Header - JMSDeliveryMode PERSISTENT
> Header - JMSDestination queue://events
> Header - JMSExpiration 0
> Header - JMSMessageID ID:lenovo-50831-1400580839684-6:2:1:1:1
> Header - JMSPriority 4
> Header - JMSRedelivered false
> Header - JMSReplyTo
> Header - JMSTimestamp 2014-05-20T12:46:49+02:00
> Header - JMSType
> Header - JMSXGroupID
> Header - JMSXGroupSeq 0
> Header - JMSXUserID
> Header - BodyLength 896
> Header - BrokerPath null
> Header - OriginalDestination
> String Property - breadcrumbId ID-lenovo-35129-1400580848377-4-3
>
>
> I was expecting something like:
> Header - pippo topic/a/b
>
> Reading the docs it seems TopicPropertyName is used only by a MQTT producer
> (http://camel.apache.org/mqtt.html -> mqttTopicPropertyName)
>
>
>
> TIA
--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/