Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARTEMIS-2024 Enable SharedClientID on ConnectionFactory #2246

Merged
merged 1 commit into from Aug 13, 2018

Conversation

mtaylor
Copy link
Contributor

@mtaylor mtaylor commented Aug 13, 2018

No description provided.

@mtaylor mtaylor force-pushed the ARTEMIS-2024 branch 2 times, most recently from c4dabcc to 2d8c367 Compare August 13, 2018 15:33
@@ -673,12 +673,16 @@ protected final void checkClosed() throws JMSException {
}
}

public void authorize() throws JMSException {
public void authorize(boolean validateClientId) throws JMSException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public interface change in client code, should probably keep the existing method for people who may have coded against it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michaelandrepearce that's internal API though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method was public I will add it back.

}

Session session1 = conn.createSession();
Session session2 = conn.createSession();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should test conn2 as well here? Seems you only test conn

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Copy and paste error ;). Will fix.

@clebertsuconic
Copy link
Contributor

failed test:
Failed tests:
ConnectionFactoryPropertiesTest.testCompareConnectionFactoryAndResourceAdapterProperties:86->compare:97->Assert.fail:88 in ActiveMQ Connection Factory only: [enableSharedClientID]
in ActiveMQ Resource Adapter only: []

@mtaylor mtaylor force-pushed the ARTEMIS-2024 branch 3 times, most recently from ae1e2d5 to 65d3336 Compare August 13, 2018 19:20
@asfgit asfgit merged commit ad6db74 into apache:master Aug 13, 2018
asfgit pushed a commit that referenced this pull request Aug 13, 2018
Copy link
Contributor

@jmesnil jmesnil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be worth mentioning in the doc that "regular" ConnectionFactory does not allow to share ClientID by default, while RA ConnectionFactory does allow it by default.

@clebertsuconic
Copy link
Contributor

@jmesnil TBH: I thinks it's dumb to use clientID on a standalone CF.

@michaelandrepearce
Copy link
Contributor

michaelandrepearce commented Aug 14, 2018

I thought you have to set it for non shared durable subscriber by Jms spec, and the client id is used by the broker for part of the durable queue name in this scenario

@clebertsuconic
Copy link
Contributor

@michaelandrepearce on the connection.. yeah! On the connectionFactory. .that's a broker-specific extension. you set it on the CF as an utility for the user.

That's just that! An utility. Setting it on the CF or on the connection it should have the same effect.

@mtaylor
Copy link
Contributor Author

mtaylor commented Aug 14, 2018

The spec also says that the preferred way to set the client id is via the CF. I think we just have to chalk this one up as the spec being ambiguous. I can see how people may interpret one way or the other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants