You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by cshannon <gi...@git.apache.org> on 2018/01/18 15:20:53 UTC
[GitHub] activemq-artemis pull request #1789: ARTEMIS-1619 - Add plugin support for a...
GitHub user cshannon opened a pull request:
https://github.com/apache/activemq-artemis/pull/1789
ARTEMIS-1619 - Add plugin support for address lifecyle
Adding callbacks to the plugin API for address creation, update and
removals
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cshannon/activemq-artemis ARTEMIS-1619
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/activemq-artemis/pull/1789.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 #1789
----
commit 07b8e7975d2e393f8a0c9c8b75e40bac36f13519
Author: Christopher L. Shannon (cshannon) <ch...@...>
Date: 2018-01-18T15:10:43Z
ARTEMIS-1619 - Add plugin support for address lifecyle
Adding callbacks to the plugin API for address creation, update and
removals
----
---
[GitHub] activemq-artemis pull request #1789: ARTEMIS-1619 - Add plugin support for a...
Posted by cshannon <gi...@git.apache.org>.
Github user cshannon commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1789#discussion_r162393664
--- 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 --
ok i updated the PR
---
[GitHub] activemq-artemis pull request #1789: ARTEMIS-1619 - Add plugin support for a...
Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1789#discussion_r162390192
--- 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 --
the printStackTrace is useful when it fails :)
I have been there.
---
[GitHub] activemq-artemis pull request #1789: ARTEMIS-1619 - Add plugin support for a...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/activemq-artemis/pull/1789
---
[GitHub] activemq-artemis pull request #1789: ARTEMIS-1619 - Add plugin support for a...
Posted by cshannon <gi...@git.apache.org>.
Github user cshannon commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1789#discussion_r162392727
--- 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 --
yeah i can remove it, i'm not sure why it's there at all
---
[GitHub] activemq-artemis pull request #1789: ARTEMIS-1619 - Add plugin support for a...
Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1789#discussion_r162390344
--- 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 --
this is actually the only request I'm going to make.. almost merged this.
---
[GitHub] activemq-artemis pull request #1789: ARTEMIS-1619 - Add plugin support for a...
Posted by clebertsuconic <gi...@git.apache.org>.
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?
---