{"action":"created","issue":{"url":"https://api.github.com/repos/akkadotnet/akka.net/issues/941","labels_url":"https://api.github.com/repos/akkadotnet/akka.net/issues/941/labels{/name}","comments_url":"https://api.github.com/repos/akkadotnet/akka.net/issues/941/comments","events_url":"https://api.github.com/repos/akkadotnet/akka.net/issues/941/events","html_url":"https://github.com/akkadotnet/akka.net/issues/941","id":72713160,"number":941,"title":"Exception creating actor implementing IWithUnboundedStash","user":{"login":"sadprofessor","id":6950685,"avatar_url":"https://avatars.githubusercontent.com/u/6950685?v=3","gravatar_id":"","url":"https://api.github.com/users/sadprofessor","html_url":"https://github.com/sadprofessor","followers_url":"https://api.github.com/users/sadprofessor/followers","following_url":"https://api.github.com/users/sadprofessor/following{/other_user}","gists_url":"https://api.github.com/users/sadprofessor/gists{/gist_id}","starred_url":"https://api.github.com/users/sadprofessor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sadprofessor/subscriptions","organizations_url":"https://api.github.com/users/sadprofessor/orgs","repos_url":"https://api.github.com/users/sadprofessor/repos","events_url":"https://api.github.com/users/sadprofessor/events{/privacy}","received_events_url":"https://api.github.com/users/sadprofessor/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/akkadotnet/akka.net/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-02T22:58:07Z","updated_at":"2015-05-07T06:32:44Z","closed_at":null,"body":"When an actor that implements IWithUnboundedStash that was resolved from DIExt (autofac in this case, although I doubt that matters) calls it's first Become, this exception is thrown:\r\n```\r\n[ERROR][02/05/2015 23:54:32][Thread 0012][ActorSystem(System)] An exception occurred while trying to apply plugin of type Akka.Actor.ActorStashPlugin to the newly created actor (Type = Machina.\r\nMessagePipeline.MessageBufferingActor, Path = akka://System/user/$b/$b)\r\nCause: System.NotSupportedException: DequeBasedMailbox required, got: UnboundedMailbox\r\nAn (unbounded) deque-based mailbox can be configured as follows:\r\n    my-custom-mailbox {\r\n        mailbox-type = \"Akka.Dispatch.UnboundedDequeBasedMailbox\"\r\n    }\r\n   at Akka.Actor.Internal.AbstractStash..ctor(IActorContext context, Int32 capacity)\r\n   at Akka.Actor.Internal.UnboundedStashImpl..ctor(IActorContext context)\r\n   at Akka.Actor.StashFactory.CreateStash(IActorContext context, Type actorType)\r\n   at Akka.Actor.ActorStashPlugin.AfterIncarnated(ActorBase actor, IActorContext context)\r\n   at Akka.Actor.ActorProducerPipeline.AfterActorIncarnated(ActorBase actor, IActorContext context)\r\n```"},"comment":{"url":"https://api.github.com/repos/akkadotnet/akka.net/issues/comments/99737375","html_url":"https://github.com/akkadotnet/akka.net/issues/941#issuecomment-99737375","issue_url":"https://api.github.com/repos/akkadotnet/akka.net/issues/941","id":99737375,"user":{"login":"Danthar","id":986519,"avatar_url":"https://avatars.githubusercontent.com/u/986519?v=3","gravatar_id":"","url":"https://api.github.com/users/Danthar","html_url":"https://github.com/Danthar","followers_url":"https://api.github.com/users/Danthar/followers","following_url":"https://api.github.com/users/Danthar/following{/other_user}","gists_url":"https://api.github.com/users/Danthar/gists{/gist_id}","starred_url":"https://api.github.com/users/Danthar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Danthar/subscriptions","organizations_url":"https://api.github.com/users/Danthar/orgs","repos_url":"https://api.github.com/users/Danthar/repos","events_url":"https://api.github.com/users/Danthar/events{/privacy}","received_events_url":"https://api.github.com/users/Danthar/received_events","type":"User","site_admin":false},"created_at":"2015-05-07T06:32:44Z","updated_at":"2015-05-07T06:32:44Z","body":"A PR containing a fix got merged a short while ago. Have you tried it with a version including that fix? I believe nowadays we have nightlies on nuget  but I'm not sure @aaronontheweb (?)\n\n-----Original Message-----\nFrom: \"DNosralla\" <notifications@github.com>\nSent: ‎07/‎05/‎2015 05:59\nTo: \"akkadotnet/akka.net\" <akka.net@noreply.github.com>\nCc: \"Arjen Smits\" <Deathraven163@gmail.com>\nSubject: Re: [akka.net] Exception creating actor implementingIWithUnboundedStash (#941)\n\nStill can't use IWithUnboundedStash actor from DI Context.\nAkka.Actor.Internal.AbstractStash is trying to get:\nvar mailbox = actorCell.Mailbox as IDequeBasedMailbox\nIf actor is created from system directly, the actorCell.Mailbox is Akka.Dispatch.UnboundedDequeBasedMailbox, that is IDequeBasedMailbox.\nIf actor is created from DI (AutoFac), the actorCell.Mailbox is\nAkka.Dispatch.UnboundedMailbox, wich does not resolve to IDequeBasedMailbox\nNext it checks if the mailbox is not null, and throw the \"DequeBasedMailbox required\" exception.\n—\nReply to this email directly or view it on GitHub."}}