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

[GitHub] activemq-artemis pull request #705: ARTEMIS-670 Adding destination creation ...

GitHub user gaohoward opened a pull request:

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

    ARTEMIS-670 Adding destination creation and deletion cli command

    

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

    $ git pull https://github.com/gaohoward/activemq-artemis master_artemis670

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

    https://github.com/apache/activemq-artemis/pull/705.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 #705
    
----
commit 9ec4a5f36f5ce481520e7a835ee701d046643297
Author: Howard Gao <ho...@gmail.com>
Date:   2016-08-08T12:19:33Z

    ARTEMIS-670 Adding destination creation and deletion cli command

----


---
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 #705: ARTEMIS-670 Adding destination creation and del...

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

    https://github.com/apache/activemq-artemis/pull/705
  
    @clebertsuconic ok looks like the sub-command style (like data command) has no objection. I'll go for it. Thanks


---
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 #705: ARTEMIS-670 Adding destination creation and del...

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

    https://github.com/apache/activemq-artemis/pull/705
  
    One concern I have is that I can't tell by the names if these commands are operating on JMS resources or core resources.  Obviously there's no such thing as a core topic so I assume that the topic-related commands are operating on a JMS topic.  However, core has a queue and JMS has a queue.  If the commands are dealing with JMS resources then I think the might need to reflect that to avoid confusion.


---
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 #705: ARTEMIS-670 Adding destination creation and del...

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

    https://github.com/apache/activemq-artemis/pull/705
  
    @clebertsuconic I've update my commit. pls review. Now if you run help it will print look like this:
    ]$ ./artemis help destination
    NAME
            artemis destination - Destination tools group (create|delete) (example
            ./artemis destination create)
    
    SYNOPSIS
            artemis destination
            artemis destination create [--durable] --name <name> [--type <destType>]
                    [--verbose] [--url <brokerURL>] [--password <password>]
                    [--address <address>] [--bindings <bindings>] [--filter <filter>]
                    [--user <user>]
            artemis destination delete --name <name> [--removeConsumers]
                    [--type <destType>] [--verbose] [--url <brokerURL>]
                    [--password <password>] [--user <user>]
    
    COMMANDS
            With no arguments, Display help information
    
            create
                create a queue or topic
    
                With --durable option, whether the queue is durable or not (default
                false)
    
                With --name option, destination name
    
                With --type option, type of destination to be created (one of
                jms-queue, topic and core-queue, default jms-queue
    
                With --verbose option, Adds more information on the execution
    
                With --url option, URL towards the broker. (default:
                tcp://localhost:61616)
    
                With --password option, Password used to connect
    
                With --address option, address of the core queue (default queue's
                name)
    
                With --bindings option, comma separated jndi binding names (default
                null)
    
                With --filter option, queue's filter string (default null)
    
                With --user option, User used to connect
    
            delete
                delete a queue or topic
    
                With --name option, destination name
    
                With --removeConsumers option, whether deleting destination with
                consumers or not (default false)
    
                With --type option, type of destination to be created (one of
                jms-queue, topic and core-queue, default jms-queue
    
                With --verbose option, Adds more information on the execution
    
                With --url option, URL towards the broker. (default:
                tcp://localhost:61616)
    
                With --password option, Password used to connect
    
                With --user option, User used to connect
    



---
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 #705: ARTEMIS-670 Adding destination creation and del...

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

    https://github.com/apache/activemq-artemis/pull/705
  
    it looks cool on the inline help \U0001f44d  


---
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 #705: ARTEMIS-670 Adding destination creation and del...

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

    https://github.com/apache/activemq-artemis/pull/705
  
    @gaohoward when I wrote the delete-topic up here was just as an example of separating the commands. I didn't mean to be literal. Do you actually need to differenticate delete-topic from delete-queue or it could just be delete?


---
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 #705: ARTEMIS-670 Adding destination creation and del...

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

    https://github.com/apache/activemq-artemis/pull/705
  
    @howardgao one thing you could do.. is to use sub-commands... look at data...
    
    you have data print, data exp... etc
    
    
    you could have queue create, queue add, ... etc...
    
    even do ./artemis help queue to list the sub commands


---
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 #705: ARTEMIS-670 Adding destination creation and del...

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

    https://github.com/apache/activemq-artemis/pull/705
  
    @johnament I liked the idea... we can't use create though on the CLI as it's used to create a broker..
    
    although we could use it with a group:
    
    
    ./artemis dest create --queue ...etc etc
    ./artemis dest delete   --queue | topic


---
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 #705: ARTEMIS-670 Adding destination creation and del...

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

    https://github.com/apache/activemq-artemis/pull/705
  
    I think using sub commands is not better than single commands as you previously suggested.



---
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 #705: ARTEMIS-670 Adding destination creation and del...

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

    https://github.com/apache/activemq-artemis/pull/705
  
    I think this gets a bit confused for users...
    
    
    Why don't you add the following commands:
    
    
    create-queue
    create-topic
    delete-queue
    delete-topic
    
    
    You can have abstract classes for what is common among the classes. It will be the same implementation almost, but the user would have more control on what he wants to be done.
    
    
    The way this is structure, you are using a create-queue command to delete it. I don't think it's too intuitive to the user.


---
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 #705: ARTEMIS-670 Adding destination creation and del...

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

    https://github.com/apache/activemq-artemis/pull/705
  
    @clebertsuconic ok done.


---
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 #705: ARTEMIS-670 Adding destination creation and del...

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

    https://github.com/apache/activemq-artemis/pull/705
  
    They all pass on my local env so those are not related to the commit. 


---
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 #705: ARTEMIS-670 Adding destination creation and del...

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

    https://github.com/apache/activemq-artemis/pull/705
  
    I personally prefer (create|delete)-(topic|queue).  This doesn't mean the others shouldn't be there, but they can be aliased.  This way either could work.


---
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 #705: ARTEMIS-670 Adding destination creation and del...

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

    https://github.com/apache/activemq-artemis/pull/705
  
    @clebertsuconic that kinda goes back to my original impl, which combine all the functionalities into one command, i.e. 
    
    ./artemis destination create|delete --name  myqueue1 --core
    
    which is not so good in that some options are irrelevant for certain operations, causing confusion. for example delete a queue is just need a name, the filter, jndi bindings, etc are not relevant. If people do
    
    ./artemis help destination 
    
    it will print all the options together. Having separated commands can reduce the confusion, because each command has only relevant options.



---
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 #705: ARTEMIS-670 Adding destination creation and del...

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

    https://github.com/apache/activemq-artemis/pull/705
  
    @gaohoward  It is the same thing... just an organizational thingy. 
    
    
    do separate commands for now. I can do it as a little tweak later.


---
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 #705: ARTEMIS-670 Adding destination creation ...

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

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


---
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 #705: ARTEMIS-670 Adding destination creation and del...

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

    https://github.com/apache/activemq-artemis/pull/705
  
    @clebertsuconic yeah we can combine the delete-topic and delete-queue, but having them in separate commands is not bad. I really don't have any preferences of one over the other.


---
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 #705: ARTEMIS-670 Adding destination creation and del...

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

    https://github.com/apache/activemq-artemis/pull/705
  
    @jbertram maybe we could call the group jms
    artemis jms create --queue(default) | --topic --name name
    artemis jms delete --name name (I'm not convinced we need --queue or --topic here?, we could figure out from the search?)
    
    
    then we could have
    
    artemis core create
    artemis core delete
    
    
    ?


---
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 #705: ARTEMIS-670 Adding destination creation and del...

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

    https://github.com/apache/activemq-artemis/pull/705
  
    @jbertram by default create-queue creates jms queues, if you want create a core queue, use --core option, like
    
    artemis create-queue --core --name corequeue1 (optionally you can also give a --address option)
    
    delete-queue has --core option too



---
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 #705: ARTEMIS-670 Adding destination creation and del...

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

    https://github.com/apache/activemq-artemis/pull/705
  
    ok, sounds good. I'll do it. Thanks Clebert.


---
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 #705: ARTEMIS-670 Adding destination creation and del...

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

    https://github.com/apache/activemq-artemis/pull/705
  
    seems the failures are unrelated to this commit. Looking into it now.


---
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 #705: ARTEMIS-670 Adding destination creation and del...

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

    https://github.com/apache/activemq-artemis/pull/705
  
    @gaohoward  It's different.. you had the behaviour specified by properties...  which was the confusing part.
    
    Grouping is different...  you still have separated commands, and aggregate them on the help. just like data.


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