Closed michaelklishin closed 6 years ago
With this change I can no longe reproduce the issue in #558 which is great and i'm happy with this approach. However, I see the java code references an issue with this method. https://github.com/rabbitmq/rabbitmq-java-client/blob/master/src/main/java/com/rabbitmq/client/impl/AMQChannel.java#L536 https://github.com/rabbitmq/rabbitmq-server/issues/710 I'm not certain how big of an issue that is, but something to consider.
@sbonebrake the server will only strip non-printable characters as it makes it next to impossible to delete such queues using CLI tools or management UI.
I am surprised that https://github.com/rabbitmq/rabbitmq-server/issues/710 was mentioned there at all as it's very much an edge case. @acogoluegnes do you think it's a major concern?
I don't think it's a major problem, as the whole thing is a best-effort approach. We could check the name of the queue, we would have to strip the name the same way in both the client and the server.
I think it's reasonable to check the name matches in the request and the response by applying the same stripping logic as the server. This doesn't apply to server-generated queue names though :)
So this cannot be extended to exchange.declare
without a protocol extension because exchange.declare-ok
doesn't carry a name (exchanges cannot be server-named). Let's stop at this and see what other methods may be worth safeguarding the same way.
This change breaks code that was using a Symbol
for the queue name or the exchange name. If this is considered a good thing, it probably deserves to be mentioned on the changelog.
@hosamaly you are the first person to notice this in over three years. No docs that I recall use symbols for topology names. I consider this to be a "feature" that worked by accident, and a mitigation should be pretty straightforward.
When a belated response for a
queue.declare
arrives, it will be filtered out like in the Java client's continuation mechanism.WIP because this can be refactored further and potentially extended to at least one more method (
exchange.declare
).References #558.