-
Notifications
You must be signed in to change notification settings - Fork 605
Autorecovering connections should keep endpoint-related fields up-to-date during recovery #158
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
Comments
Feel free to submit a PR against the stable branch.
|
I'm sorry but I can't really make sense of what you're asking for, for example, what is a "cool 'live' Engpoint"? "reverse-similar"? Why is this feature so "fantastic"? Can you please start by explaining what you expect to happen during recovery? |
Ok, let's try.
This is what I've called a 'live' situation. It's fantastic :) because we 2016-03-03 14:18 GMT+03:00 Michael Klishin notifications@github.com:
SY, |
OK, so some endpoint-related fields are not updated during recovery. Got it. Feel free to submit a PR. |
Hi @EGlaznev, Been looking at this request. I hope I have understood it correctly. Apologies if not. Cheers |
I do think there is a valid bug with the hostnames collection being ignored if autorecovery is not enabled. I have raised this as a separate bug #176 |
Hi @EGlaznev I'm going to close this issue as you can get the live Endpoint info from the connection instead of the ConnectionFactory. Please re-open or raise another issue if we haven't analysed the request correctly. |
This is some kind of usability in source code :)
When performed
fh = m_factory.CreateFrameHandler(m_factory.Endpoint.CloneWithHostname(h));
reachableHostname = h;
a member m_factory.Endpoint remains untoched and contains useless default value 'localhost:5672'.
And even when a connection for server from 'hostnames' is establied - m_factory.Endpoint still remains default. But if we have only the 1 active connection - let's store it in m_factory.Endpoint :)?
The second part: instead of store valid host in 'reachableHostname' - I propose to store it in HostName :). This allows to change code some kind back - you do not need any more :) CloneWithHostname() and corresponding calls/fixes, because (for example) parameterless CreateFrameHandler() uses member Endpoint already (as far as I realized - exactly this was a reason for https://github.com/rabbitmq/rabbitmq-dotnet-client/issues/153, because as mentioned above - Endpoint.Clone... do not changes the member itself).
Something 'reverse-similar' was done here:
public virtual IConnection CreateConnection()
{
return CreateConnection(new List() { HostName });
}
It's cool when HostName is set - all next calls provide good results. But when user uses (oops) a direct call of CreateConnection(IList hostnames) - he didn't get cool 'live' Endpoint. After mine proposal he will get a fantastic feature - the name of really connected host from a whole list :)
Best regards,
Eugene.
The text was updated successfully, but these errors were encountered: