Antti / rust-amqp

AMQP client in pure rust. Corresponds to rabbitmq spec.
MIT License
247 stars 45 forks source link

include vhost in readme connect example #31

Closed wraithan closed 8 years ago

wraithan commented 8 years ago

Without the extra / in the example it tries to connect without a vhost which causes mysterious ConnectionReset errors or Protocol("Unexpected method frame: connection.close, expected: connection.open-ok") depending on configuration and OS.

Antti commented 8 years ago

I've seen some libraries explicitly handle connection.close during connection.open phase to indicate invalid vhost.

Antti commented 8 years ago

@wraithan thank you.

wraithan commented 8 years ago

Yeah, would love to see the vhost thing handled a bit better. We saw in the examples that you use IP address and had an extra slash for vhost when we were starting to use the library, we tested a bit to see which one was causing the issue.

Might be cool to just default to / if you don't specify. That is how many libraries work (like defaulting to using 5672 as the port). But I understand if you prefer to not have many defaults and lean toward always being explicit.