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
Conversation
c4dabcc
to
2d8c367
Compare
@@ -673,12 +673,16 @@ protected final void checkClosed() throws JMSException { | |||
} | |||
} | |||
|
|||
public void authorize() throws JMSException { | |||
public void authorize(boolean validateClientId) throws JMSException { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
failed test: |
ae1e2d5
to
65d3336
Compare
There was a problem hiding this 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.
@jmesnil TBH: I thinks it's dumb to use clientID on a standalone CF. |
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 |
@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. |
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. |
No description provided.