GitHub user takanorig opened a pull request:

    https://github.com/apache/camel/pull/635

    Modify camel-paho

    I modified camel-paho,
    
    * Parsing subscribe topic correctly.
    I modified parsing logic because previous implementation can not parse the 
topic with the uri options.
    
    * Changing exchange header value to the mqtt properties which is original 
bean.
    MqttMessage class has not topic. But topic is very important value.
    So, I changed the exchange header which has topic, and privious header 
value can be specified by "headerType" option.
    
    
    And, in original source,  the following errors occur.
    
    ```
    java.lang.NullPointerException: null
        at 
org.apache.camel.impl.DefaultRuntimeEndpointRegistry.notify(DefaultRuntimeEndpointRegistry.java:245)
        at org.apache.camel.util.EventHelper.doNotifyEvent(EventHelper.java:805)
        at 
org.apache.camel.util.EventHelper.notifyExchangeCreated(EventHelper.java:411)
        at 
org.apache.camel.impl.DefaultUnitOfWork.<init>(DefaultUnitOfWork.java:123)
        at 
org.apache.camel.impl.DefaultUnitOfWork.<init>(DefaultUnitOfWork.java:72)
        at 
org.apache.camel.impl.DefaultUnitOfWorkFactory.createUnitOfWork(DefaultUnitOfWorkFactory.java:34)
        at 
org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.createUnitOfWork(CamelInternalProcessor.java:663)
        at 
org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.before(CamelInternalProcessor.java:631)
        at 
org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.before(CamelInternalProcessor.java:608)
        at 
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:138)
        at 
org.apache.camel.component.paho.PahoConsumer$1.messageArrived(PahoConsumer.java:73)
        at 
org.eclipse.paho.client.mqttv3.internal.CommsCallback.handleMessage(CommsCallback.java:354)
        at 
org.eclipse.paho.client.mqttv3.internal.CommsCallback.run(CommsCallback.java:162)
        at java.lang.Thread.run(Thread.java:745)
    ```
    
    I do not know why the error occurred.
    Could you check it?


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/takanorig/camel camel-paho-2.17.0

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/635.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #635
    
----
commit 2a376c9ce18e7688be5d7d0f3b66dbbdb515ee4f
Author: Takanori Suzuki <takano...@gmail.com>
Date:   2015-10-11T17:20:46Z

    Modify parsing topic in the uri, and Exchange header value is changed 
because mqtt topic is able to use in after process.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to