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

Provide a support for delete queue query parameters #217

Closed
kubamarchwicki opened this issue Apr 5, 2020 · 6 comments · Fixed by #218
Closed

Provide a support for delete queue query parameters #217

kubamarchwicki opened this issue Apr 5, 2020 · 6 comments · Fixed by #218

Comments

@kubamarchwicki
Copy link
Contributor

The RabbitMQ HTTP API support additional query parameters when deleting a queue. The http-client currently doesn't support it

When DELETEing a queue you can add the query string parameters if-empty=true and / or if-unused=true. These prevent the delete from succeeding if the queue contains messages, or has consumers, respectively

I'll work on that PR

@kubamarchwicki
Copy link
Contributor Author

That would fix (or open a way to support) #118, isn't it?

@michaelklishin
Copy link
Member

michaelklishin commented Apr 5, 2020

#118 may depend on query parameters but is otherwise not really related. Why?

@kubamarchwicki
Copy link
Contributor Author

kubamarchwicki commented Apr 5, 2020

I was referring to the query parameters aspect. Sorry if that brought some confusion :)

To my understanding of the codebase, the query parameters are not really used so far in the http-client (or at least I haven't found anything). There is no convention for the model (ShovelInfo, QueueInfo and other *Info classes are used to pass http body details. The *Details classes encapsulate the response data. There are no model classes for query parameters). Additionally, the rest template configuration (I started with the synchronous client) handles path segments and not query parameters.
Building a convention in one of these two changes - will make the other a fairly trivial change.

@michaelklishin
Copy link
Member

That's a fair analysis.

@acogoluegnes
Copy link
Contributor

I would add a new deleteQueue(String vhost, String name, DeleteQueueParameters parameters) method with the 2 flags as properties. The parameters would be added to the URL if they're present and the RestTemplate would encode the values with one of the delete methods that accept parameters.

@kubamarchwicki
Copy link
Contributor Author

kubamarchwicki commented Apr 6, 2020

Thank you @acogoluegnes - that's exactly how I started. I'll adjust the naming and provide a needed test

acogoluegnes added a commit that referenced this issue Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants