Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

ChannelOwner tries to create forwarder before old one is suspended (forwarder is not unique) #84

Open
n1ko-w1ll opened this issue Jul 6, 2016 · 2 comments

Comments

@n1ko-w1ll
Copy link

Hi again,

another issue we found has to do with the forwarder created by the ChannelOwner.

On a Shutdown message in the ChannelOwner, the forwarder is stopped via the context. However, context.stop only guarantees that the suspend message will be the next message the actor gets, but not when it will get it. If the connection is recovered too quickly, the ChannelOwner receives the new Channel before the old forwarder receives the suspend message and the creation of a new forwarder fails with "akka.actor.InvalidActorNameException: actor name [forwarder] is not unique!".

Why does the forwarder actor has to have a defined name at all? As far as I can tell, it is never selected by its name anyway.

Best regards
Niko

P.S.: we use the amqp-client_2.11 in version 1.5.

@sstone
Copy link
Owner

sstone commented Jul 7, 2016

Hi,
Well actually I did name it a while back so that problems like this could be easily detected because from a functional point of view it is supposed to be unique :)
You're right: it does not need to be named, but for debugging reasons a simple scheme with a randomized name which start with "forwarder" could help, what do you think ?
Thanks,
Fabrice

@n1ko-w1ll
Copy link
Author

Hi Fabrice,

If it would be guaranteed, that the actor was suspended before the next forwarder is created, a unique name is preferrable to (as you said) detect weird problems faster. In this case, a naming scheme with "forwarder" in the actor name might definitely help.

Best regards
Niko

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants