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-2076 Make Filter updateable #2296

Closed
wants to merge 1 commit into from

Conversation

michaelandrepearce
Copy link
Contributor

No description provided.

@@ -710,6 +710,7 @@ String updateQueue(@Parameter(name = "name", desc = "Name of the queue") String
@Parameter(name = "exclusive", desc = "If the queue should route exclusively to one consumer") Boolean exclusive,
@Parameter(name = "consumersBeforeDispatch", desc = "Number of consumers needed before dispatch can start") Integer consumersBeforeDispatch,
@Parameter(name = "delayBeforeDispatch", desc = "Delay to wait before dispatching if number of consumers before dispatch is not met") Long delayBeforeDispatch,
@Parameter(name = "filter", desc = "The filter to use on the queue") String filter,
Copy link
Contributor

Choose a reason for hiding this comment

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

We can't change the management API in anything but a major release. You'll need to add another method.

Copy link
Contributor Author

@michaelandrepearce michaelandrepearce Sep 6, 2018

Choose a reason for hiding this comment

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

This change is in the same release e.g. this is a new method for 2.7 (the delay before dispatch stuff is new e.g. this new method was added in this current cycle - #2175)

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it. Thanks for the clarification.

@clebertsuconic
Copy link
Contributor

Is this updating the queue on the journal as well ?

@clebertsuconic
Copy link
Contributor

It is not !!! This will need to be a more complete feature. If you restart the broker you get the old filter back afaik.

@michaelandrepearce
Copy link
Contributor Author

michaelandrepearce commented Sep 6, 2018

@clebertsuconic its updating as per other queue field update.... see updateQueue in postoffice (this was prexisiting and how other updates work) . which updates back to the storage manager.

If thats not working (e.g. the update to storage isn't being honoured) then theres a bigger issue / regression in update queue bindings within the storagemanager thats pre-existing and seperate.

what makes you think this isnt? if you could share, as this would affect other update use cases as noted, shares all same logic.

@michaelandrepearce
Copy link
Contributor Author

michaelandrepearce commented Sep 6, 2018

@jbertram
Copy link
Contributor

jbertram commented Sep 6, 2018

IMO all these commits should be squashed. I don't mind if you take authorship of the test I wrote for the other PR (assuming you don't).

@michaelandrepearce
Copy link
Contributor Author

@jbertram yes, i was wondering about squashing and then worried about your commit, as you dont mind, ill squash.

@michaelandrepearce
Copy link
Contributor Author

@jbertram all squashed now.

@clebertsuconic
Copy link
Contributor

@michaelandrepearce as I talked on the vote thread: Can you tweak (or add a test) that play with a broker restart, and validate the queue is updated on the journal, and messages not lost please?

@michaelandrepearce
Copy link
Contributor Author

michaelandrepearce commented Sep 6, 2018

@clebertsuconic the issue on vote thread is around route-type change from another JIRA and PR, this is separate feature around updating filters, though we're avoiding the issue that introduced, by following the same update logic of other queue field updates.

I will add a test case though to ensure when running and config is reloaded the queue is not destroyed but updated instead e.g. ensure the queue instance is the same.

FYI on the the route-type change ill send in a PR as an alternative fix on that that also would avoid queue destruction. (the underlying issue is during deploy there's actually an error thrown due to routing on address info update before deploy of queues its trying to update the addressinfo before the queue route is changed, thus it wasn't actually getting to the update queue logic when you do a routing change)

@jbertram
Copy link
Contributor

jbertram commented Sep 6, 2018

LGTM

@michaelandrepearce
Copy link
Contributor Author

Dont merge i need to extend the tests still as per cleberts request

@clebertsuconic
Copy link
Contributor

@michaelandrepearce if you don't have time to do it don't worry I will do it.. I was asking more in a way like.. if you can... know what I mean?

Add Tests
Add implementation inline with other queue updatable settings.
Enhance tests to ensure queue is not destroyed during config change and messages in queue already are preserved
@michaelandrepearce
Copy link
Contributor Author

@clebertsuconic i have enhanced the tests to check binding ids are the same (aka not recreated) and also added check for message loss, this is added both to the redeploy and the restart test cases.

@clebertsuconic
Copy link
Contributor

I was able to fix the conflicts myself after the previous merges.. don't worry!

@michaelandrepearce
Copy link
Contributor Author

@clebertsuconic i can rebase if you need to merge this? I have one locally already, let me know if you wish me to push up, or if you're merging as is (i assume from your response the latter)

@clebertsuconic
Copy link
Contributor

Don’t worry. It was easy to rebase. Simple one.

Will merge it soon.

@asfgit asfgit closed this in 3cedfbd Sep 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants