activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [2/2] activemq-artemis git commit: ARTEMIS-1370 consumer command, does not offer a ClientID command line arg
Date Wed, 23 Aug 2017 15:00:13 GMT
ARTEMIS-1370 consumer command, does not offer a ClientID command line arg


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/9ff5741f
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/9ff5741f
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/9ff5741f

Branch: refs/heads/master
Commit: 9ff5741f62ca4b223437c0b81dbbc277cbca1048
Parents: 9021e03
Author: Pat Fox <pat.g.fox@gmail.com>
Authored: Wed Aug 23 12:02:26 2017 +0200
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Wed Aug 23 11:00:04 2017 -0400

----------------------------------------------------------------------
 .../artemis/cli/commands/messages/ConnectionAbstract.java    | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ff5741f/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java
index 03bc075..bf466c6 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java
@@ -35,9 +35,17 @@ public class ConnectionAbstract extends InputAbstract {
    @Option(name = "--password", description = "Password used to connect")
    protected String password;
 
+   @Option(name = "--clientID", description = "ClientID to be associated with connection")
+   String clientID;
+
 
    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
       ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(brokerURL, user, password);
+
+      if(clientID!=null){
+         System.out.println("Consumer:: clientID = " + clientID);
+         cf.setClientID(clientID);
+      }
       try {
          Connection connection = cf.createConnection();
          connection.close();


Mime
View raw message