activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARTEMIS-1619) Add plugin support for address creation, update and removal
Date Thu, 18 Jan 2018 16:14:00 GMT

    [ https://issues.apache.org/jira/browse/ARTEMIS-1619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16330700#comment-16330700
] 

ASF GitHub Bot commented on ARTEMIS-1619:
-----------------------------------------

Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1789#discussion_r162390676
  
    --- Diff: tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/StompPluginTest.java
---
    @@ -127,10 +131,33 @@ public void testSendAndReceive() throws Exception {
                                                    AFTER_CREATE_SESSION, BEFORE_CLOSE_SESSION,
AFTER_CLOSE_SESSION, BEFORE_CREATE_CONSUMER,
                                                    AFTER_CREATE_CONSUMER, BEFORE_CLOSE_CONSUMER,
AFTER_CLOSE_CONSUMER, BEFORE_CREATE_QUEUE, AFTER_CREATE_QUEUE,
                                                    MESSAGE_ACKED, BEFORE_SEND, AFTER_SEND,
BEFORE_MESSAGE_ROUTE, AFTER_MESSAGE_ROUTE, BEFORE_DELIVER,
    -                                               AFTER_DELIVER);
    +                                               AFTER_DELIVER, BEFORE_ADD_ADDRESS, AFTER_ADD_ADDRESS);
    +
    +      } catch (Throwable e) {
    +         fail(e.getMessage());
    +      }
    +
    +   }
    +
    +   @Test
    +   public void testStompAutoCreateAddress() throws Exception {
    +
    +      try {
    +         URI uri = new URI("ws+v12.stomp://localhost:61613");
    +         StompClientConnection newConn = StompClientConnectionFactory.createClientConnection(uri);
    +         newConn.connect(defUser, defPass);
    +
    +         subscribeQueue(newConn, "a-sub", "autoCreated");
    +
    +         // unsub
    +         unsubscribe(newConn, "a-sub");
    +         newConn.disconnect();
    +
    +         verifier.validatePluginMethodsAtLeast(1, BEFORE_ADD_ADDRESS, AFTER_ADD_ADDRESS,
    +               BEFORE_REMOVE_ADDRESS, AFTER_REMOVE_ADDRESS);
     
           } catch (Throwable e) {
    -         e.printStackTrace();
    +         fail(e.getMessage());
    --- End diff --
    
    hmmmm.. but it was being ignored before?
    
    maybe just remove the catch and let it fail? remove the throws Exception on the test?


> Add plugin support for address creation, update and removal
> -----------------------------------------------------------
>
>                 Key: ARTEMIS-1619
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1619
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 2.4.0
>            Reporter: Christopher L. Shannon
>            Assignee: Christopher L. Shannon
>            Priority: Major
>             Fix For: 2.5.0
>
>
> As I have been working on my own custom plugins I have found it would be helpful to also
have callbacks for when addresses are added, updated, or removed from the broker.  Addresses
can be auto created and auto destroyed so being able to take some action on those events with
the plugin API is useful.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message