You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by johnament <gi...@git.apache.org> on 2016/04/12 02:22:28 UTC

[GitHub] activemq-artemis pull request: ARTEMIS-463 Refactored protocol loa...

GitHub user johnament opened a pull request:

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

    ARTEMIS-463 Refactored protocol loading code to not duplicate logic, and load from the default list.

    Prior to this change, when you would start the broker on the CLI, you would see this:
    
    ```
    20:01:10,543 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE
    20:02:02,931 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: AMQP
    20:02:05,420 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-hornetq-protocol]. Adding protocol support for: HORNETQ
    20:02:17,616 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-mqtt-protocol]. Adding protocol support for: MQTT
    20:02:19,547 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-openwire-protocol]. Adding protocol support for: OPENWIRE
    20:02:20,758 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-stomp-protocol]. Adding protocol support for: STOMP
    20:02:31,795 INFO  [org.apache.activemq.artemis.core.server] AMQ221003: Trying to deploy queue jms.queue.DLQ
    20:02:31,810 INFO  [org.apache.activemq.artemis.core.server] AMQ221003: Trying to deploy queue jms.queue.ExpiryQueue
    20:02:40,906 WARN  [org.apache.activemq.artemis.core.server] AMQ222203: Classpath lacks a protocol-manager for protocol AMQP, Protocol being ignored on acceptor TransportConfiguration(name=amqp, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyAcceptorFactory) ?port=5672&host=0-0-0-0&protocols=AMQP
    20:02:41,984 WARN  [org.apache.activemq.artemis.core.server] AMQ222203: Classpath lacks a protocol-manager for protocol HORNETQ, Protocol being ignored on acceptor TransportConfiguration(name=hornetq, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyAcceptorFactory) ?port=5445&host=0-0-0-0&protocols=HORNETQ,STOMP
    20:02:43,308 WARN  [org.apache.activemq.artemis.core.server] AMQ222203: Classpath lacks a protocol-manager for protocol STOMP, Protocol being ignored on acceptor TransportConfiguration(name=hornetq, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyAcceptorFactory) ?port=5445&host=0-0-0-0&protocols=HORNETQ,STOMP
    20:02:43,309 WARN  [org.apache.activemq.artemis.core.server] AMQ222203: Classpath lacks a protocol-manager for protocol MQTT, Protocol being ignored on acceptor TransportConfiguration(name=mqtt, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyAcceptorFactory) ?port=1883&host=0-0-0-0&protocols=MQTT
    Listening for transport dt_socket at address: 5005
    20:02:43,310 WARN  [org.apache.activemq.artemis.core.server] AMQ222203: Classpath lacks a protocol-manager for protocol STOMP, Protocol being ignored on acceptor TransportConfiguration(name=stomp, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyAcceptorFactory) ?port=61613&host=0-0-0-0&protocols=STOMP
    20:02:43,516 INFO  [org.apache.activemq.artemis.core.server] AMQ221020: Started Acceptor at 0.0.0.0:61616 for protocols [CORE,MQTT,AMQP,HORNETQ,STOMP,OPENWIRE]
    20:02:43,522 INFO  [org.apache.activemq.artemis.core.server] AMQ221020: Started Acceptor at 0.0.0.0:5445 for protocols [CORE,MQTT,AMQP,HORNETQ,STOMP,OPENWIRE]
    20:02:43,542 INFO  [org.apache.activemq.artemis.core.server] AMQ221020: Started Acceptor at 0.0.0.0:5672 for protocols [CORE,MQTT,AMQP,HORNETQ,STOMP,OPENWIRE]
    20:02:43,552 INFO  [org.apache.activemq.artemis.core.server] AMQ221020: Started Acceptor at 0.0.0.0:1883 for protocols [CORE,MQTT,AMQP,HORNETQ,STOMP,OPENWIRE]
    20:02:43,583 INFO  [org.apache.activemq.artemis.core.server] AMQ221020: Started Acceptor at 0.0.0.0:61613 for protocols [CORE,MQTT,AMQP,HORNETQ,STOMP,OPENWIRE]
    20:02:43,584 INFO  [org.apache.activemq.artemis.core.server] AMQ221007: Server is now live
    ```
    
    This doesn't look right for a few reasons, mostly that every protocol is now listening on every port, and you get classpath errors for all protocols.  The issue seemed to come from a recent refactor for openwire support, where the logic was consolidated.  The consolidation caused an empty map to always be read from and modified.  Of course this means that the necessary data was not found.  I changed the behavior to read from the internal map and modify the passed in map, and now the output is closer to what was seen in 1.2.0
    
    ```
    20:15:21,654 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE
    20:15:21,656 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: AMQP
    20:15:21,657 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-hornetq-protocol]. Adding protocol support for: HORNETQ
    20:15:21,658 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-mqtt-protocol]. Adding protocol support for: MQTT
    20:15:21,659 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-openwire-protocol]. Adding protocol support for: OPENWIRE
    20:15:21,660 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-stomp-protocol]. Adding protocol support for: STOMP
    20:15:21,893 INFO  [org.apache.activemq.artemis.core.server] AMQ221003: Trying to deploy queue jms.queue.DLQ
    20:15:21,900 INFO  [org.apache.activemq.artemis.core.server] AMQ221003: Trying to deploy queue jms.queue.ExpiryQueue
    20:15:22,182 INFO  [org.apache.activemq.artemis.core.server] AMQ221020: Started Acceptor at 0.0.0.0:61616 for protocols [CORE,MQTT,AMQP,HORNETQ,STOMP,OPENWIRE]
    20:15:22,186 INFO  [org.apache.activemq.artemis.core.server] AMQ221020: Started Acceptor at 0.0.0.0:5445 for protocols [HORNETQ,STOMP]
    20:15:22,187 INFO  [org.apache.activemq.artemis.core.server] AMQ221020: Started Acceptor at 0.0.0.0:5672 for protocols [AMQP]
    20:15:22,191 INFO  [org.apache.activemq.artemis.core.server] AMQ221020: Started Acceptor at 0.0.0.0:1883 for protocols [MQTT]
    20:15:22,193 INFO  [org.apache.activemq.artemis.core.server] AMQ221020: Started Acceptor at 0.0.0.0:61613 for protocols [STOMP]
    20:15:22,193 INFO  [org.apache.activemq.artemis.core.server] AMQ221007: Server is now live
    ```
    
    The right protocols, the right ports.  So much happy.
    
    I'm not sure what tests could be added to check for this.  If you have any recommendations, I'm all eyes.

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

    $ git pull https://github.com/johnament/activemq-artemis ARTEMIS-463

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

    https://github.com/apache/activemq-artemis/pull/456.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 #456
    
----
commit 6de003965e6ce808f73e3e8dac41c13d171e3b40
Author: John D. Ament <jo...@apache.org>
Date:   2016-04-12T00:18:28Z

    ARTEMIS-463 Refactored protocol loading code to not duplicate logic, and load from the default list.

----


---
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: ARTEMIS-463 Refactored protocol loa...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on the pull request:

    https://github.com/apache/activemq-artemis/pull/456#issuecomment-209085123
  
    Nice one.. thanks.. I'm merging it


---
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: ARTEMIS-463 Refactored protocol loa...

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

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


---
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.
---