[jira] [Commented] (AMQ-6430) noLocal=true in durable subscriptions is ignored after reconnect

2016-09-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-6430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15516747#comment-15516747
 ] 

ASF subversion and git services commented on AMQ-6430:
--

Commit e0c70b843fb963cfa5e3be322c0d271ba61709bb in activemq's branch 
refs/heads/activemq-5.14.x from [~cshannon]
[ https://git-wip-us.apache.org/repos/asf?p=activemq.git;h=e0c70b8 ]

https://issues.apache.org/jira/browse/AMQ-6430

Modifying patch so that only stores that persist the noLocal flag will
check if this flag has changed to prevent a subscription from being
deleted by mistake

(cherry picked from commit 18571ce09b6385d8560200928a353e9da1a1ffe4)


> noLocal=true in durable subscriptions is ignored after reconnect
> 
>
> Key: AMQ-6430
> URL: https://issues.apache.org/jira/browse/AMQ-6430
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 5.13.4, 5.14.0
> Environment: Ubuntu 14.04, OpenJDK 1.7.0_111 and Oracle JDK 1.8.0.74, 
> other environments not testet
>Reporter: Daniel Faber
>Assignee: Christopher L. Shannon
> Fix For: 5.14.1, 5.15.0
>
> Attachments: ActiveMQNoLocalTest.java, pom.xml
>
>
> I create a connection to my local ActiveMQ and open two sessions. In the 
> first session I create a durable topic subscriber with noLocal=true. In the 
> second session I send a message to the same topic. Then I close both sessions 
> and the connection. The first time I do this, everything works well, that 
> means I send but do not receive the message. The second time I run the same 
> application I send AND receive the message.
> After removing all files and directories in ActiveMQ's data directory, not 
> receiving my own message works again, but only once.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-6430) noLocal=true in durable subscriptions is ignored after reconnect

2016-09-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-6430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15516746#comment-15516746
 ] 

ASF subversion and git services commented on AMQ-6430:
--

Commit 18571ce09b6385d8560200928a353e9da1a1ffe4 in activemq's branch 
refs/heads/master from [~cshannon]
[ https://git-wip-us.apache.org/repos/asf?p=activemq.git;h=18571ce ]

https://issues.apache.org/jira/browse/AMQ-6430

Modifying patch so that only stores that persist the noLocal flag will
check if this flag has changed to prevent a subscription from being
deleted by mistake


> noLocal=true in durable subscriptions is ignored after reconnect
> 
>
> Key: AMQ-6430
> URL: https://issues.apache.org/jira/browse/AMQ-6430
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 5.13.4, 5.14.0
> Environment: Ubuntu 14.04, OpenJDK 1.7.0_111 and Oracle JDK 1.8.0.74, 
> other environments not testet
>Reporter: Daniel Faber
>Assignee: Christopher L. Shannon
> Fix For: 5.14.1, 5.15.0
>
> Attachments: ActiveMQNoLocalTest.java, pom.xml
>
>
> I create a connection to my local ActiveMQ and open two sessions. In the 
> first session I create a durable topic subscriber with noLocal=true. In the 
> second session I send a message to the same topic. Then I close both sessions 
> and the connection. The first time I do this, everything works well, that 
> means I send but do not receive the message. The second time I run the same 
> application I send AND receive the message.
> After removing all files and directories in ActiveMQ's data directory, not 
> receiving my own message works again, but only once.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-6430) noLocal=true in durable subscriptions is ignored after reconnect

2016-09-23 Thread Christopher L. Shannon (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-6430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15516688#comment-15516688
 ] 

Christopher L. Shannon commented on AMQ-6430:
-

There are some test failures because JDBC and LevelDB don't support storing the 
noLocal flag.  Working on a fix now such that the noLocal flag only applies to 
stores that persist the flag (currently the memory store and kahadb/multikahadb 
when using openwire version >=11).  If JDBC and LevelDB are updated in the 
future such that this flag is stored then an update can be done so that this 
patch applies to those stores as well.

> noLocal=true in durable subscriptions is ignored after reconnect
> 
>
> Key: AMQ-6430
> URL: https://issues.apache.org/jira/browse/AMQ-6430
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 5.13.4, 5.14.0
> Environment: Ubuntu 14.04, OpenJDK 1.7.0_111 and Oracle JDK 1.8.0.74, 
> other environments not testet
>Reporter: Daniel Faber
>Assignee: Christopher L. Shannon
> Fix For: 5.14.1, 5.15.0
>
> Attachments: ActiveMQNoLocalTest.java, pom.xml
>
>
> I create a connection to my local ActiveMQ and open two sessions. In the 
> first session I create a durable topic subscriber with noLocal=true. In the 
> second session I send a message to the same topic. Then I close both sessions 
> and the connection. The first time I do this, everything works well, that 
> means I send but do not receive the message. The second time I run the same 
> application I send AND receive the message.
> After removing all files and directories in ActiveMQ's data directory, not 
> receiving my own message works again, but only once.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-6430) noLocal=true in durable subscriptions is ignored after reconnect

2016-09-21 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-6430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15509928#comment-15509928
 ] 

ASF subversion and git services commented on AMQ-6430:
--

Commit d3b86e77ddfe7d0185ff150520a0dddc9c6cf53e in activemq's branch 
refs/heads/activemq-5.14.x from [~cshannon]
[ https://git-wip-us.apache.org/repos/asf?p=activemq.git;h=d3b86e7 ]

https://issues.apache.org/jira/browse/AMQ-6430

When a nolocal durable consumer reconnects the new connectionId is properly 
captured for
the NoLocal expression so that nolocal works on reconnect.  Also fixed
the detection of the nolocal value changing on consumer connect.

(cherry picked from commit 7c293b661f22245ce21bf2b5aa1c5bf4192cb8c5)


> noLocal=true in durable subscriptions is ignored after reconnect
> 
>
> Key: AMQ-6430
> URL: https://issues.apache.org/jira/browse/AMQ-6430
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 5.13.4, 5.14.0
> Environment: Ubuntu 14.04, OpenJDK 1.7.0_111 and Oracle JDK 1.8.0.74, 
> other environments not testet
>Reporter: Daniel Faber
>Assignee: Christopher L. Shannon
> Attachments: ActiveMQNoLocalTest.java, pom.xml
>
>
> I create a connection to my local ActiveMQ and open two sessions. In the 
> first session I create a durable topic subscriber with noLocal=true. In the 
> second session I send a message to the same topic. Then I close both sessions 
> and the connection. The first time I do this, everything works well, that 
> means I send but do not receive the message. The second time I run the same 
> application I send AND receive the message.
> After removing all files and directories in ActiveMQ's data directory, not 
> receiving my own message works again, but only once.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-6430) noLocal=true in durable subscriptions is ignored after reconnect

2016-09-21 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-6430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15509926#comment-15509926
 ] 

ASF subversion and git services commented on AMQ-6430:
--

Commit 7c293b661f22245ce21bf2b5aa1c5bf4192cb8c5 in activemq's branch 
refs/heads/master from [~cshannon]
[ https://git-wip-us.apache.org/repos/asf?p=activemq.git;h=7c293b6 ]

https://issues.apache.org/jira/browse/AMQ-6430

When a nolocal durable consumer reconnects the new connectionId is properly 
captured for
the NoLocal expression so that nolocal works on reconnect.  Also fixed
the detection of the nolocal value changing on consumer connect.


> noLocal=true in durable subscriptions is ignored after reconnect
> 
>
> Key: AMQ-6430
> URL: https://issues.apache.org/jira/browse/AMQ-6430
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 5.13.4, 5.14.0
> Environment: Ubuntu 14.04, OpenJDK 1.7.0_111 and Oracle JDK 1.8.0.74, 
> other environments not testet
>Reporter: Daniel Faber
>Assignee: Christopher L. Shannon
> Attachments: ActiveMQNoLocalTest.java, pom.xml
>
>
> I create a connection to my local ActiveMQ and open two sessions. In the 
> first session I create a durable topic subscriber with noLocal=true. In the 
> second session I send a message to the same topic. Then I close both sessions 
> and the connection. The first time I do this, everything works well, that 
> means I send but do not receive the message. The second time I run the same 
> application I send AND receive the message.
> After removing all files and directories in ActiveMQ's data directory, not 
> receiving my own message works again, but only once.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-6430) noLocal=true in durable subscriptions is ignored after reconnect

2016-09-21 Thread Christopher L. Shannon (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-6430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15509813#comment-15509813
 ] 

Christopher L. Shannon commented on AMQ-6430:
-

Looks like there are two places where the NoLocal attribute needs to be 
checked, it is done in one location but not the other.

> noLocal=true in durable subscriptions is ignored after reconnect
> 
>
> Key: AMQ-6430
> URL: https://issues.apache.org/jira/browse/AMQ-6430
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 5.13.4, 5.14.0
> Environment: Ubuntu 14.04, OpenJDK 1.7.0_111 and Oracle JDK 1.8.0.74, 
> other environments not testet
>Reporter: Daniel Faber
>Assignee: Christopher L. Shannon
> Attachments: ActiveMQNoLocalTest.java, pom.xml
>
>
> I create a connection to my local ActiveMQ and open two sessions. In the 
> first session I create a durable topic subscriber with noLocal=true. In the 
> second session I send a message to the same topic. Then I close both sessions 
> and the connection. The first time I do this, everything works well, that 
> means I send but do not receive the message. The second time I run the same 
> application I send AND receive the message.
> After removing all files and directories in ActiveMQ's data directory, not 
> receiving my own message works again, but only once.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-6430) noLocal=true in durable subscriptions is ignored after reconnect

2016-09-21 Thread Christopher L. Shannon (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-6430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15509755#comment-15509755
 ] 

Christopher L. Shannon commented on AMQ-6430:
-

I took a look at this and there are actually two problems here with how noLocal 
is handled with durables.  The main issue you are seeing is that when the 
durable comes back online the new connectionId is not being captured for the 
NoLocal expression parser which means that when messages are sent after broker 
restart the logic thinks that the message isn't coming from the current 
subscription when it is.  The fix here is to make sure the connectionId is 
updated properly when the new consumer comes online.

The second issue is that the JMS spec says that 
{noformat}
A client can change an existing durable subscription by creating a durable
TopicSubscriber with the same name and a new topic and/or message selector,
or NoLocal attribute. Changing a durable subscription is equivalent to deleting
and recreating it.
{noformat}

Right now we aren't checking if that NoLocal attribute changes at all when a 
new consumer comes online.  Base on the spec I think we should update the 
activation check such that if the NoLocal attribute changes (ie goes from false 
to true or true to false) we treat it as a selector change and process it the 
same way (delete and recreate the sub)

I am working on a patch and fix now to go out with our 5.14.1 release.

> noLocal=true in durable subscriptions is ignored after reconnect
> 
>
> Key: AMQ-6430
> URL: https://issues.apache.org/jira/browse/AMQ-6430
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 5.13.4, 5.14.0
> Environment: Ubuntu 14.04, OpenJDK 1.7.0_111 and Oracle JDK 1.8.0.74, 
> other environments not testet
>Reporter: Daniel Faber
>Assignee: Christopher L. Shannon
> Attachments: ActiveMQNoLocalTest.java, pom.xml
>
>
> I create a connection to my local ActiveMQ and open two sessions. In the 
> first session I create a durable topic subscriber with noLocal=true. In the 
> second session I send a message to the same topic. Then I close both sessions 
> and the connection. The first time I do this, everything works well, that 
> means I send but do not receive the message. The second time I run the same 
> application I send AND receive the message.
> After removing all files and directories in ActiveMQ's data directory, not 
> receiving my own message works again, but only once.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-6430) noLocal=true in durable subscriptions is ignored after reconnect

2016-09-16 Thread Daniel Bonnauer (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-6430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15495754#comment-15495754
 ] 

Daniel Bonnauer commented on AMQ-6430:
--

Successfully tried to reproduce this Issue using ActiveMQ 5.13.3


> noLocal=true in durable subscriptions is ignored after reconnect
> 
>
> Key: AMQ-6430
> URL: https://issues.apache.org/jira/browse/AMQ-6430
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 5.13.4, 5.14.0
> Environment: Ubuntu 14.04, OpenJDK 1.7.0_111 and Oracle JDK 1.8.0.74, 
> other environments not testet
>Reporter: Daniel Faber
> Attachments: ActiveMQNoLocalTest.java, pom.xml
>
>
> I create a connection to my local ActiveMQ and open two sessions. In the 
> first session I create a durable topic subscriber with noLocal=true. In the 
> second session I send a message to the same topic. Then I close both sessions 
> and the connection. The first time I do this, everything works well, that 
> means I send but do not receive the message. The second time I run the same 
> application I send AND receive the message.
> After removing all files and directories in ActiveMQ's data directory, not 
> receiving my own message works again, but only once.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-6430) noLocal=true in durable subscriptions is ignored after reconnect

2016-09-15 Thread Daniel Faber (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-6430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15493782#comment-15493782
 ] 

Daniel Faber commented on AMQ-6430:
---

Steps to reproduce:

1. start ActiveMQ: {{~/bin/apache-activemq-5.14.0 $ bin/activemq start}}

2. run attached test application, output is
{noformat}
message sent: ID:hostname-44638-1473955333904-1:1:2:1:1; body: test-message
{noformat}
as expected.

3. run test application again, output is
{noformat}
message sent: ID:hostname-55628-1473955434257-1:1:2:1:1; body: test-message
incoming message: ID:hostname-55628-1473955434257-1:1:2:1:1; body: test-message
{noformat}
but this time I receive my own message which I didn't expect.

4. stop ActiveMQ: {{~/bin/apache-activemq-5.14.0 $ bin/activemq stop}}

5. remove ActiveMQ's data files: {{~/bin/apache-activemq-5.14.0 $ rm -r data/*}}

6. start ActiveMQ: {{~/bin/apache-activemq-5.14.0 $ bin/activemq start}}

7. run test application, output is
{noformat}
message sent: ID:hostname-46012-1473955651268-1:1:2:1:1; body: test-message
{noformat}
it seems to work, but..

8. run test application again, output is
{noformat}
message sent: ID:hostname-56206-1473955682047-1:1:2:1:1; body: test-message
incoming message: ID:hostname-56206-1473955682047-1:1:2:1:1; body: test-message
{noformat}
again, I receive my own message which I didn't expect.


> noLocal=true in durable subscriptions is ignored after reconnect
> 
>
> Key: AMQ-6430
> URL: https://issues.apache.org/jira/browse/AMQ-6430
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 5.13.4, 5.14.0
> Environment: Ubuntu 14.04, OpenJDK 1.7.0_111 and Oracle JDK 1.8.0.74, 
> other environments not testet
>Reporter: Daniel Faber
> Attachments: ActiveMQNoLocalTest.java, pom.xml
>
>
> I create a connection to my local ActiveMQ and open two sessions. In the 
> first session I create a durable topic subscriber with noLocal=true. In the 
> second session I send a message to the same topic. Then I close both sessions 
> and the connection. The first time I do this, everything works well, that 
> means I send but do not receive the message. The second time I run the same 
> application I send AND receive the message.
> After removing all files and directories in ActiveMQ's data directory, not 
> receiving my own message works again, but only once.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)