Open n1ko-w1ll opened 8 years ago
Hi,
To make sure that I understand what you've seen:
Is it correct ?
I guess that in ConnectionOwner shutdown handling could (though I'm not sure yet that it should) be moved to unhandled() instead of connected() but in any case channel actors should have received a Shutdown message:
So even if the connection somehow did not receive a Shutdown message, and so did not forward it to its children, they should have received a Shutdown message sent by their forwarder anyway ?
Thanks, Fabrice
Hi Fabrice,
Thanks for your answer. Your summary is correct.
Moving the Shutdown handling to the unhandled could actually work.
To be honest, we only had one Consumer/ChannelOwner in this case. It could be, that we otherwise would have received the Shutdown in each of them directly. Looking again at the Shutdown handler in the ConnectionOwner, it could also be, that we received the Shutdown after it already was put to the disconnected state because there wouldn't be any log output then.
Nevertheless, all transitions to the disconnected state should handle it the same way (e.g. set the Connection var to None).
Best regards Niko
Hi,
while analyzing our logs and comparing them to the source code, we found some issues.
If the connection gets lost and somehow the ChannelOwner receives a Shutdown before the ConnectionOwner, the ChannelOwner asks the ConnectionOwner to create a new channel (ChannelOwner.scala:219) and becomes disconnected (ChannelOwner.scala:221). The ConnectionOwner tries to create the channel (ConnectionOwner.scala:177) which failes with an AlreadyClosedException. Due to this exception, the ConnectionOwner becomes disconnected (ConnectionOwner.scala:181), too. However, in this case it does not inform its children about the disconnect.
Shouldn't the same error handling apply in this case like on a received Shutdown message (ConnectionOwner.scala:192)?
In our case we haven't received the Shutdown on the Connection at all, otherwhise we would have seen it as unknown message logged out by the ConnectionOwner when it is in the disconnected state.
Best regards Niko
P.S.: we use the amqp-client_2.11 in version 1.5.