[GitHub] activemq-artemis issue #1621: ARTEMIS-1416 Queue is not autocreated if addre...

2017-11-02 Thread gaohoward
Github user gaohoward commented on the issue:

https://github.com/apache/activemq-artemis/pull/1621
  
@clebertsuconic thanks!


---


[GitHub] activemq-artemis pull request #1631: ARTEMIS-1492 obfuscate passwords in acc...

2017-11-02 Thread asfgit
Github user asfgit closed the pull request at:

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


---


[GitHub] activemq-artemis issue #1621: ARTEMIS-1416 Queue is not autocreated if addre...

2017-11-02 Thread clebertsuconic
Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/1621
  
Please.. do not merge this Pull Request.. let me do some tests with it...

@gaohoward  nothing wrong with it.. it's actually great.. helped me a 
lot... just that what I'm doing is crossing a lot with this.. and I want to 
make sure it's all good.


---


Re: [VOTE] Apache ActiveMQ Artemis 2.4.0

2017-11-02 Thread Clebert Suconic
+1

Ran a few examples and tests. checked tags...

Nice one Justin!

On Wed, Nov 1, 2017 at 5:21 PM, Timothy Bish  wrote:
> On 11/01/2017 02:53 AM, Justin Bertram wrote:
>>
>> I would like to propose an Apache ActiveMQ Artemis 2.4.0 release.
>>
>> We had these new features and improvements added as part of 2.4.0:
>>
>> [ARTEMIS-534] - Allow JMX configuration from broker.xml
>> [ARTEMIS-1447] - JDBC NodeManager to support JDBC HA Shared Store
>> [ARTEMIS-1428] - Allow configuration of max frame payload length for STOMP
>> web-socket
>> [ARTEMIS-1463] - Implement rbac of management objects
>>
>> The release notes can be found here:
>>
>> https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12341540=12315920
>>
>> Source and binary distributions can be found here:
>> https://repository.apache.org/content/repositories/
>> orgapacheactivemq-1153/org/apache/activemq/apache-artemis/2.4.0/
>>
>> The Maven repository is here:
>> https://repository.apache.org/content/repositories/orgapacheactivemq-1153
>>
>> In case you want to give it a try with the maven repo on examples:
>> http://activemq.apache.org/artemis/docs/latest/hacking-
>> guide/validating-releases.html
>>
>> The source tag:
>> https://git-wip-us.apache.org/repos/asf?p=activemq-artemis.
>> git;a=tag;h=refs/tags/2.4.0
>>
>> I will update the website after the vote has passed.
>>
>>
>> [ ] +1 approve the release as Apache Artemis 2.4.0
>> [ ] +0 no opinion
>> [ ] -1 disapprove (and reason why)
>>
>> Here's my +1
>>
>>
>> Justin
>>
> +1
>
> * Validated signatures and checksums
> * checked for license and notice files in the archives
> * Created new broker instance from the binary package and ran it, check that
> web console worked
> * Ran some Qpid JMS client examples against the running broker
> * Built from source and ran some of the tests including the AMQP tests in
> the integration suite.
> * Checked using mvn apache-rat:check that no missing license headers were
> found.
>
>
> --
> Tim Bish
> twitter: @tabish121
> blog: http://timbish.blogspot.com/
>



-- 
Clebert Suconic


[GitHub] activemq-artemis issue #1631: ARTEMIS-1492 obfuscate passwords in acceptorCo...

2017-11-02 Thread clebertsuconic
Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/1631
  
+1.. 
I can't merge it now as my workspace is a mess.. anyone feel free to merge 
this if I don't get here soon.


---


[GitHub] activemq-artemis pull request #1634: Removed quotation marks from if stateme...

2017-11-02 Thread Haydend
Github user Haydend closed the pull request at:

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


---


[GitHub] activemq-artemis issue #1634: Removed quotation marks from if statement in a...

2017-11-02 Thread Haydend
Github user Haydend commented on the issue:

https://github.com/apache/activemq-artemis/pull/1634
  
Understood, thank you for your time looking into this. I will close the PR.


---


[GitHub] activemq-artemis issue #1634: Removed quotation marks from if statement in a...

2017-11-02 Thread clebertsuconic
Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/1634
  
@Haydend you don't need to set ARTEMIS.HOME as a variable. 

All you do is:


from where you installed artemis:

"c:\program files\activemq-artemis\bin\artemis.cmd" create 
"c:\anywhereyouwant\" 


set PATH=%PATH%;c:anywhereyouwant\bin


artemis.cmd


and it should work...

once you set the path, the ARTEMIS_INSTANCE is picked from the profile 
where that cmd is located at.




we could change to have the variable defined.. but it would be more work on 
that... as I see your script is not working every usage. (like running from the 
bin directly for instance).



---


[GitHub] activemq-artemis issue #1634: Removed quotation marks from if statement in a...

2017-11-02 Thread clebertsuconic
Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/1634
  
Usually we don’t do that.  You just call artemis.cmd and it will read the 
artemis.profile. 

It seems this is break other usage. 


---


[GitHub] activemq-artemis issue #1634: Removed quotation marks from if statement in a...

2017-11-02 Thread Haydend
Github user Haydend commented on the issue:

https://github.com/apache/activemq-artemis/pull/1634
  
Sorry, I'm not sure what you are asking. This is a fresh install and have 
not touched the artemis.profile. It is not installed as a service. I'm setting 
it up as a development instance on my local machine, thus will run it within a 
command prompt on my desktop. 

 ARTEMIS_HOME is set as a System Environment Variable in Windows.


---


[GitHub] activemq-artemis issue #1634: Removed quotation marks from if statement in a...

2017-11-02 Thread clebertsuconic
Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/1634
  
Are you setting this with command line as opposed to the profile ?


---


[GitHub] activemq-artemis issue #1634: Removed quotation marks from if statement in a...

2017-11-02 Thread clebertsuconic
Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/1634
  
How do you set it on your artemis.profile ?


---


[GitHub] activemq-artemis issue #1634: Removed quotation marks from if statement in a...

2017-11-02 Thread Haydend
Github user Haydend commented on the issue:

https://github.com/apache/activemq-artemis/pull/1634
  
Running on Windows 10
%ARTEMIS_HOME% is set to "C:\Program 
Files\Apache\Artemis\apache-artemis-2.3.0"
That's including the quote marks, so that when you run "echo 
%ARTEMIS_HOME%" the following is returned:
"C:\Program Files\Apache\Artemis\apache-artemis-2.3.0"

%PATH% is modified to include : %ARTEMIS_HOME%\bin

Open new CMD window and run "artemis", without the modified artemis.cmd 
file I get the following returned:
Files\Apache\Artemis\apache-artemis-2.3.0""=="" was unexpected at this time.


---


[GitHub] activemq-artemis issue #1634: Removed quotation marks from if statement in a...

2017-11-02 Thread clebertsuconic
Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/1634
  
I don’t see this error.  

Please give us right steps to produce the error you saw. 


Perhaps you should discuss on users or dev list. 


---


[GitHub] activemq-artemis pull request #1634: Removed quotation marks from if stateme...

2017-11-02 Thread Haydend
GitHub user Haydend opened a pull request:

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

Removed quotation marks from if statement in artemis.cmd

These were causing an error when %ARTEMIS_HOME% string contains quotes 
also, for example : "C:\Program Files\Apache\Artemis\apache-artemis-2.3.0"

Error produced :
C:\>artemis
Files\Apache\Artemis\apache-artemis-2.3.0""=="" was unexpected at this time.


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

$ git pull https://github.com/Haydend/activemq-artemis SPACE_FIX

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

https://github.com/apache/activemq-artemis/pull/1634.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 #1634


commit 1c5a82531fd4027abe6023e85f9e00a2cf4048e3
Author: Hayden Dunnicliffe 
Date:   2017-11-02T16:10:25Z

Removed quotation marks from if statement in artemis.cmd
These were causing an error when %ARTEMIS_HOME% string contains quotes 
also, for example : "C:\Program Files\Apache\Artemis\apache-artemis-2.3.0"




---


[GitHub] activemq-artemis pull request #1633: Modified artemis.cmd to be able to hand...

2017-11-02 Thread Haydend
Github user Haydend closed the pull request at:

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


---


[GitHub] activemq-artemis issue #1633: Modified artemis.cmd to be able to handle an A...

2017-11-02 Thread clebertsuconic
Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/1633
  
Can you close this PR please?


---


[GitHub] activemq-artemis pull request #1633: Modified artemis.cmd to be able to hand...

2017-11-02 Thread clebertsuconic
Github user clebertsuconic commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/1633#discussion_r148565519
  
--- Diff: artemis-distribution/src/main/resources/bin/artemis.cmd ---
@@ -25,7 +25,7 @@ set ARTEMIS_HOME="%CD%"
 POPD
 
 :CHECK_ARTEMIS_HOME
-if exist %ARTEMIS_HOME%\bin\artemis.cmd goto CHECK_JAVA
+if exist "%ARTEMIS_HOME%\bin\artemis.cmd" goto CHECK_JAVA
--- End diff --

when you create a server in windows... the profile will contain

set ARTEMIS_HOME="C:\Program Files\apache-artemis-2.5.0-SNAPSHOT"

I tried your patch and it didn't work.. for that reason I cannot merge it..


There are no issues as I see with the current thing.


---


[GitHub] activemq-artemis pull request #1630: NO-JIRA updating release documentation

2017-11-02 Thread asfgit
Github user asfgit closed the pull request at:

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


---


[GitHub] activemq-artemis pull request #1632: NO-JIRA fixes

2017-11-02 Thread asfgit
Github user asfgit closed the pull request at:

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


---


[GitHub] activemq-artemis pull request #1621: ARTEMIS-1416 Queue is not autocreated i...

2017-11-02 Thread clebertsuconic
Github user clebertsuconic commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/1621#discussion_r148532812
  
--- Diff: 
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java
 ---
@@ -405,7 +407,10 @@ public void serverSend(final Transaction transaction,
   }
 
   //here check queue-autocreation
-  if (!bindingQuery(address, RoutingType.ANYCAST)) {
+  org.apache.qpid.proton.amqp.messaging.Target target = 
(org.apache.qpid.proton.amqp.messaging.Target) receiver.getRemoteTarget();
--- End diff --

^^ this is not being used... I will amend without this as I merge


---


Re: Twitter

2017-11-02 Thread Martyn Taylor
+1 from me

On Thu, Nov 2, 2017 at 12:43 AM, Christopher Shannon <
christopher.l.shan...@gmail.com> wrote:

> I think lazy concensus is ok.  As long as no one has any objections I would
> think it's ok to move ahead with it under PMC control as Tim pointed out.
> But Tim is right that should give it 72 hours for people to see the thread
> and comment.
>
> On Wed, Nov 1, 2017 at 7:28 PM, Clebert Suconic  >
> wrote:
>
> > Do we a vote even for that? It seemed a no brainer.
> >
> > On Wed, Nov 1, 2017 at 6:56 PM Michael André Pearce <
> > michael.andre.pea...@me.com> wrote:
> >
> > > Should be deactivated now.
> > >
> > >
> > >
> > > > On 1 Nov 2017, at 22:51, Michael André Pearce <
> > > michael.andre.pea...@me.com> wrote:
> > > >
> > > > That would be my apologies on that i was setting up to make sure it
> > > would work. I didn’t realise the ramifications I will disable it whilst
> > we
> > > await the time to elapse.
> > > >
> > > > Please accept my apologies
> > > >
> > > >
> > > >
> > > > Sent from my iPhone
> > > >
> > > >>> On 1 Nov 2017, at 22:49, Timothy Bish  wrote:
> > > >>>
> > > >>> On 11/01/2017 06:40 PM, Michael André Pearce wrote:
> > > >>> Agreed PMC ultimately will have overall control.
> > > >>>
> > > >>> This is why the mail before about the “owner” account to be the
> PMC.
> > > >>>
> > > >>
> > > >> Problem being that there is now a "official" ActiveMQ twitter
> account
> > > that is not currently owned or controlled by the PMC that was created
> > from
> > > a discussion that did not give the standard 72 hours for discussion and
> > > either consensus or lazy consensus to occur.
> > > >>
> > > >>> Sent from my iPhone
> > > >>>
> > > > On 1 Nov 2017, at 22:24, Timothy Bish 
> wrote:
> > > >
> > > > On 11/01/2017 06:13 PM, Michael André Pearce wrote:
> > > > Also a shout out for committers and pmc, if you want to be added
> as
> > > we set this up we will need your twitter handles (I have some peoples
> but
> > > not all)
> > >  Ultimately the PMC needs to decide which committers would be given
> > > access as per the Apache social media policy.
> > > 
> > > > Cheers
> > > > Mike
> > > >
> > > > Sent from my iPhone
> > > >
> > > >> On 1 Nov 2017, at 22:11, Michael André Pearce <
> > > michael.andre.pea...@me.com> wrote:
> > > >>
> > > >> I have sent a mail to the PMC. But in the interest of being
> open,
> > > will share on the Dev mail list also.
> > > >>
> > > >> We are slowly setting this up to check all would work etc etc.
> > > >>
> > > >> We have set the “owner” account to the private pmc mail address
> as
> > > per Apache guidelines, it seems there might be some filter on the
> private
> > > mail list as it seems the verify email from twitter is not received.
> > > >>
> > > >> I have such asked for advice from the PMC.
> > > >>
> > > >> Incase anyone has done this for other Apache projects and have
> > some
> > > advice how they handled this or get the verify email, it is welcome.
> > > >>
> > > >> Cheers
> > > >> Mike
> > > >>
> > > >> Sent from my iPhone
> > > >>
> > > >>> On 1 Nov 2017, at 16:34, Michael André Pearce <
> > > michael.andre.pea...@me.com> wrote:
> > > >>>
> > > >>> Twitter for a group account has a nice level of owner, admin
> and
> > > user, that means committers can login with their own accounts and no
> one
> > > need the master/owners password for day to day, the owner account just
> > > needed to reset bits if ever needed.
> > > >>>
> > > >>> Owner = private pmc email (once we’ve setup all, this is easy
> to
> > > transfer)
> > > >>>
> > > >>>
> > > >>>
> > > >>> Sent from my iPhone
> > > >>>
> > >  On 1 Nov 2017, at 16:19, Michael André Pearce <
> > > michael.andre.pea...@me.com> wrote:
> > > 
> > >  Yes, I would set it up sort it out then finally transfer the
> > > owner to private mail list so pmc have control
> > > 
> > >  Sent from my iPhone
> > > 
> > > > On 1 Nov 2017, at 13:36, Timothy Bish 
> > > wrote:
> > > >
> > > > Any official project social media account needs to be under
> > > control the project PMC, refer to
> > > > https://www.apache.org/foundation/marks/socialmedia
> > > >
> > > >> On 11/01/2017 09:22 AM, Christopher Shannon wrote:
> > > >> +1
> > > >>
> > > >> On Wed, Nov 1, 2017 at 9:14 AM, Clebert Suconic <
> > > clebert.suco...@gmail.com>
> > > >> wrote:
> > > >>
> > > >>> +1
> > > >>>
> > > >>> On Wed, Nov 1, 2017 at 2:40 AM, Jean-Baptiste Onofré <
> > > j...@nanthrax.net>
> > > >>> wrote:
> > >  No objection from my side.
> > > 
> > >  Regards
> > >  JB
> > > 
> > > 

[GitHub] activemq-artemis pull request #1629: ARTEMIS-1486 Core client should be noti...

2017-11-02 Thread stanlyDoge
Github user stanlyDoge commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/1629#discussion_r148531299
  
--- Diff: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java
 ---
@@ -1978,6 +1980,36 @@ public void testConnectorServiceManagement() throws 
Exception {
   Assert.assertEquals("myconn2", 
managementControl.getConnectorServices()[0]);
}
 
+   @Test
+   public void testCloseConsumer() throws Exception {
+  SimpleString address = RandomUtil.randomSimpleString();
+  SimpleString name = RandomUtil.randomSimpleString();
+  boolean durable = true;
+
+  ActiveMQServerControl serverControl = createManagementControl();
+
+  
checkNoResource(ObjectNameBuilder.DEFAULT.getQueueObjectName(address, name, 
RoutingType.ANYCAST));
+  serverControl.createAddress(address.toString(), "ANYCAST");
+  serverControl.createQueue(address.toString(), "ANYCAST", 
name.toString(), null, durable, -1, false, false);
+
+  ServerLocator receiveLocator = createInVMNonHALocator();
+  ClientSessionFactory receiveCsf = 
createSessionFactory(receiveLocator);
+  ClientSession receiveClientSession = receiveCsf.createSession(true, 
false, false);
+  final ClientConsumer consumer = 
receiveClientSession.createConsumer(name);
+  final ClientProducer producer = 
receiveClientSession.createProducer(name);
+
+  ServerSession ss = server.getSessions().iterator().next();
+  ServerConsumer sc = ss.getServerConsumers().iterator().next();
+
+  producer.send(receiveClientSession.createMessage(true));
+  consumer.receive(1000);
+
+  Assert.assertFalse(consumer.isClosed());
+  
serverControl.closeConsumerWithID(((ClientSessionImpl)receiveClientSession).getName(),
 Long.toString(sc.sequentialID()));
+  Wait.waitFor(() -> consumer.isClosed(), 1000, 100);
--- End diff --

ah, thanks


---


[GitHub] activemq-artemis issue #1633: Modified artemis.cmd to be able to handle an A...

2017-11-02 Thread clebertsuconic
Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/1633
  
I'm handling this...


---


[GitHub] activemq-artemis pull request #1630: NO-JIRA updating release documentation

2017-11-02 Thread clebertsuconic
Github user clebertsuconic commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/1630#discussion_r148524207
  
--- Diff: RELEASING.md ---
@@ -16,16 +16,32 @@ Things to do before issuing a new release:
 
 * Test the standalone release (this should be done on windows as well as 
linux):
 1. Unpack the distribution zip or tar.gz
-2. Start and stop the server (run.sh and stop.sh) for each configuration
+2. Start and stop the server
 3. Run the examples (follow the instructions under examples/index.html)
 5. Check the manuals have been created properly
 6. Check the javadocs are created correctly (including the diagrams)
 
-* If every thing is successful.  Follow the Apache guide 
(http://www.apache.org/dev/publishing-maven-artifacts.html) to build and 
publish artifacts to Nexus and send out a release vote.
--- End diff --

I think we should keep that reference...

At least keep this as a note: this is based on 
http://www.apache.org/dev/publishing-maven-artifacts.html


---


[GitHub] activemq-artemis pull request #1629: ARTEMIS-1486 Core client should be noti...

2017-11-02 Thread clebertsuconic
Github user clebertsuconic commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/1629#discussion_r148523746
  
--- Diff: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java
 ---
@@ -1978,6 +1980,36 @@ public void testConnectorServiceManagement() throws 
Exception {
   Assert.assertEquals("myconn2", 
managementControl.getConnectorServices()[0]);
}
 
+   @Test
+   public void testCloseConsumer() throws Exception {
+  SimpleString address = RandomUtil.randomSimpleString();
+  SimpleString name = RandomUtil.randomSimpleString();
+  boolean durable = true;
+
+  ActiveMQServerControl serverControl = createManagementControl();
+
+  
checkNoResource(ObjectNameBuilder.DEFAULT.getQueueObjectName(address, name, 
RoutingType.ANYCAST));
+  serverControl.createAddress(address.toString(), "ANYCAST");
+  serverControl.createQueue(address.toString(), "ANYCAST", 
name.toString(), null, durable, -1, false, false);
+
+  ServerLocator receiveLocator = createInVMNonHALocator();
+  ClientSessionFactory receiveCsf = 
createSessionFactory(receiveLocator);
+  ClientSession receiveClientSession = receiveCsf.createSession(true, 
false, false);
+  final ClientConsumer consumer = 
receiveClientSession.createConsumer(name);
+  final ClientProducer producer = 
receiveClientSession.createProducer(name);
+
+  ServerSession ss = server.getSessions().iterator().next();
+  ServerConsumer sc = ss.getServerConsumers().iterator().next();
+
+  producer.send(receiveClientSession.createMessage(true));
+  consumer.receive(1000);
+
+  Assert.assertFalse(consumer.isClosed());
+  
serverControl.closeConsumerWithID(((ClientSessionImpl)receiveClientSession).getName(),
 Long.toString(sc.sequentialID()));
+  Wait.waitFor(() -> consumer.isClosed(), 1000, 100);
--- End diff --

With my pull request on Wait, you would been able to do 
Wait.assertTrue(consumer::isClosed)


---


[GitHub] activemq-artemis pull request #1629: ARTEMIS-1486 Core client should be noti...

2017-11-02 Thread asfgit
Github user asfgit closed the pull request at:

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


---


[GitHub] activemq-artemis pull request #1629: ARTEMIS-1486 Core client should be noti...

2017-11-02 Thread mtaylor
Github user mtaylor commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/1629#discussion_r148502455
  
--- Diff: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
 ---
@@ -1621,6 +1621,7 @@ public boolean closeConsumerWithID(final String 
sessionID, final String ID) thro
for (ServerConsumer serverConsumer : serverConsumers) {
   if (serverConsumer.sequentialID() == Long.valueOf(ID)) {
  serverConsumer.close(true);
+ serverConsumer.disconnect();
  return true;
--- End diff --

Something to note here.  When the server calls disconnect, it sends a 
DisconnectConsumer packet to the client.  The client processes this packet 
(cleans up some local state) then sends a CloseConsumer packet to the broker.  
Since the broker has already closed the consumer it will log an error message.

Since this is a "ForceClose" style operation, I think it's OK just to 
document that this may happen.  I think an improvement on this is to update the 
client to only send the close consumer packet if the close is called from the 
client API and not via the disconnect consumer packet.


---


[GitHub] activemq-artemis pull request #1629: ARTEMIS-1486 Core client should be noti...

2017-11-02 Thread mtaylor
Github user mtaylor commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/1629#discussion_r148502940
  
--- Diff: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java
 ---
@@ -1978,6 +1980,36 @@ public void testConnectorServiceManagement() throws 
Exception {
   Assert.assertEquals("myconn2", 
managementControl.getConnectorServices()[0]);
}
 
+   @Test
+   public void testCloseConsumer() throws Exception {
+  SimpleString address = RandomUtil.randomSimpleString();
+  SimpleString name = RandomUtil.randomSimpleString();
+  boolean durable = true;
+
+  ActiveMQServerControl serverControl = createManagementControl();
+
+  
checkNoResource(ObjectNameBuilder.DEFAULT.getQueueObjectName(address, name, 
RoutingType.ANYCAST));
+  serverControl.createAddress(address.toString(), "ANYCAST");
+  serverControl.createQueue(address.toString(), "ANYCAST", 
name.toString(), null, durable, -1, false, false);
+
+  ServerLocator receiveLocator = createInVMNonHALocator();
+  ClientSessionFactory receiveCsf = 
createSessionFactory(receiveLocator);
+  ClientSession receiveClientSession = receiveCsf.createSession(true, 
false, false);
+  final ClientConsumer consumer = 
receiveClientSession.createConsumer(name);
+  final ClientProducer producer = 
receiveClientSession.createProducer(name);
+
+  ServerSession ss = server.getSessions().iterator().next();
+  ServerConsumer sc = ss.getServerConsumers().iterator().next();
+
+  producer.send(receiveClientSession.createMessage(true));
+  consumer.receive(1000);
+
+  Assert.assertFalse(consumer.isClosed());
+  
serverControl.closeConsumerWithID(((ClientSessionImpl)receiveClientSession).getName(),
 Long.toString(sc.sequentialID()));
+  Wait.waitFor(() -> consumer.isClosed(), 1000, 100);
+  Assert.assertTrue(consumer.isClosed());
+   }
+
protected void scaleDown(ScaleDownHandler handler) throws Exception {
--- End diff --

Nice test.  I realise this is outside the scope of this JIRA, but some more 
testing around other protocols would be useful, in addition it'd be good to 
test that this works with the Artemis JMS Client since it uses CORE under the 
covers.  We can do these in follow up commits.

+1 overall.  Merging


---


[GitHub] activemq-artemis pull request #1633: Modified artemis.cmd to be able to hand...

2017-11-02 Thread Haydend
GitHub user Haydend opened a pull request:

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

Modified artemis.cmd to be able to handle an ARTEMIS_HOME containing spaces

For example : 'C:\Program Files\Apache\Artemis\apache-artemis-2.3.0'.

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

$ git pull https://github.com/Haydend/activemq-artemis SPACE_FIX

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

https://github.com/apache/activemq-artemis/pull/1633.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 #1633


commit a1ad6016e721c7bffe726404ee9add0a0b0ca4d0
Author: Hayden Dunnicliffe 
Date:   2017-11-02T10:35:13Z

Modified artemis.cmd to be able to handle an ARTEMIS_HOME containing 
spaces. For example : 'C:\Program Files\Apache\Artemis\apache-artemis-2.3.0'.




---