You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by orpiske <gi...@git.apache.org> on 2017/08/16 08:18:51 UTC

[GitHub] activemq-artemis pull request #1464: Implement support for intercepting addi...

GitHub user orpiske opened a pull request:

    https://github.com/apache/activemq-artemis/pull/1464

    Implement support for intercepting additional MQTT control packets

    Previously, only the PUBLISH packet was intercepted. This patch modifies the code to add support for the other incoming/outgoing MQTT control packets.

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

    $ git pull https://github.com/orpiske/activemq-artemis mqtt-interceptor-conn

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

    https://github.com/apache/activemq-artemis/pull/1464.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 #1464
    
----
commit 48b9573c66d428722fab172290865b986573f764
Author: Otavio R. Piske <an...@gmail.com>
Date:   2017-08-14T17:12:39Z

    Implement support for intercepting additional MQTT control packets
    
    Previously, only the PUBLISH packet was intercepted. This patch modifies
    the code to add support for the other incoming/outgoing MQTT control
    packets.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #1464: Implement support for intercepting addi...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/activemq-artemis/pull/1464


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis issue #1464: Implement support for intercepting additional ...

Posted by orpiske <gi...@git.apache.org>.
Github user orpiske commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1464
  
    Sample output from running the modified Interceptor example:
    
    ```
    server-out:MQTT Interceptor gets called 
    server-out:A MQTT control packet was intercepted CONNACK
    server-out:MQTT Interceptor gets called 
    server-out:A MQTT control packet was intercepted CONNECT
    server-out:A MQTT CONNECT control packet was intercepted MqttConnectMessage[fixedHeader=MqttFixedHeader[messageType=CONNECT, isDup=false, qosLevel=AT_MOST_ONCE, isRetain=false, remainingLength=34], variableHeader=MqttConnectVariableHeader[name=MQIsdp, version=3, hasUserName=false, hasPassword=false, isWillRetain=false, isWillFlag=false, isCleanSession=true, keepAliveTimeSeconds=30], payload=MqttConnectPayload[clientIdentifier=7f000001d5e85993fe7f, willTopic=null, willMessage=null, userName=null, password=null]]
    Connected to Artemis
    server-out:MQTT Interceptor gets called 
    server-out:A MQTT control packet was intercepted SUBSCRIBE
    Subscribed to topics.
    server-out:MQTT Interceptor gets called 
    server-out:A MQTT control packet was intercepted PUBLISH
    server-out:Original message: This is message 1
    server-out:MQTT Interceptor gets called 
    server-out:A MQTT control packet was intercepted PUBLISH
    server-out:Original message: Modified message 
    server-out:MQTT Interceptor gets called 
    server-out:A MQTT control packet was intercepted PUBREC
    server-out:MQTT Interceptor gets called 
    server-out:A MQTT control packet was intercepted PUBREL
    server-out:MQTT Interceptor gets called 
    server-out:A MQTT control packet was intercepted PUBCOMP
    Sent message
    Received message: Modified message 
    ```


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis issue #1464: Implement support for intercepting additional ...

Posted by orpiske <gi...@git.apache.org>.
Github user orpiske commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1464
  
    Some additional comments: @jbertram suggested to also look at  org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl#invokeInterceptors. 
    
    While I agree that it seems how it should have been done, it also seems like a more comprehensive change. Therefore, I decided to just extend the original code to intercept the other MQTT control packets.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---