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-1422 Fix match change to support wildcard config #1537

Closed
wants to merge 1 commit into from

Conversation

michaelandrepearce
Copy link
Contributor

No description provided.

@@ -94,6 +99,11 @@
*/
private final ArrayList<HierarchicalRepositoryChangeListener> listeners = new ArrayList<>();

public HierarchicalObjectRepository(final WildcardConfiguration wildcardConfiguration) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd rather see a default constructor which calls this one so all the places in the code-base which use the default WildcardConfiguration don't have to be changed to pass in new WildcardConfiguration() or null.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair enough I was divided at the time between the two approaches, will change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

have updated PR with this.



<wildcard-addresses>
<enabled>true</enabled>
Copy link
Contributor

@jbertram jbertram Sep 15, 2017

Choose a reason for hiding this comment

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

FWIW, the matching logic will use the configured <delimiter>, <any-words>, and <single-word> regardless of how <enabled> is set. However, the routing logic won't. Not sure if we want to make those semantics match (no pun intended).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you do if false? Don't match? As that's what filtering does, it disables the ability to filter, it doesn't set the values to a default.

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 original flag was better name routing-enabled, maybe the config option should be renamed? (With still supporting enabled, as not major release, so can't break bits)

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe the only place isEnabled is checked is when the PostOffice is constructed. If it is enabled then a org.apache.activemq.artemis.core.postoffice.impl.WildcardAddressManager is used otherwise a org.apache.activemq.artemis.core.postoffice.impl.SimpleAddressManager is used. This effectively enables/disables wildcard address routing. This is technically different than address matching.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree...the original parameter name was better. The fact that it was changed is probably also an indication as to why the matching logic was left untouched.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

question is do we want to

  1. rename the config sub element to "routing-enabled" (similar to the current deprecated higher level, we think is a better name) to make this clearer, but keep it local to the sub config area. (for back compatibility we don't remove enabled - just don't advertise it/deprecate it)
  2. just we need to make it clear in doc for the current "enabled"
  3. Un-deprecate the old higher level config which we both believe is better named.

my preference is 1,3,2 - ill look to do 1 unless strong opinion

Copy link
Contributor

Choose a reason for hiding this comment

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

I think your first option is the best. My overall order preference would be 1, 2, 3.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

have updated pr with option 1.

@michaelandrepearce
Copy link
Contributor Author

michaelandrepearce commented Sep 17, 2017

@jbertram @mtaylor @clebertsuconic can someone either increase the timeout of PR builds, or remove under powered nodes such as "ubuntu-eu3" from doing builds. Other nodes like H25 seem fine. Having build failure due to timeout for exactly this, which seems other PR's also seeing, is a little painful.

@jbertram
Copy link
Contributor

I removed ubuntu-eu3 from the list of nodes where the PR build will run. Let me know if there are any other nodes where timeouts happen often.

@michaelandrepearce
Copy link
Contributor Author

@jbertram cheers that's helped

@michaelandrepearce
Copy link
Contributor Author

michaelandrepearce commented Sep 21, 2017

@jbertram you ok to merge this, seems no further review comments

@asfgit asfgit closed this in 9e44771 Sep 25, 2017
asfgit pushed a commit that referenced this pull request Sep 25, 2017
This closes #1536
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants