These are chat archives for petabridge/akka-bootcamp

9th
Feb 2017
Scott Nimrod
@Bizmonger_twitter
Feb 09 2017 17:32
Can someone help me understand when I should rely on a mailbox as a parameter versus relying on a message?
Aaron Stannard
@Aaronontheweb
Feb 09 2017 17:33
ah, this is with the F# api?
cc @horusiath
also, may want to try the https://gitter.im/akkadotnet/akka.net channel
that's the main room for Akka.NET
lots more activity in there
Scott Nimrod
@Bizmonger_twitter
Feb 09 2017 17:34
My apologies. First time using this app.
Aaron Stannard
@Aaronontheweb
Feb 09 2017 17:34
no no, you're fine
just that I'm not much of an F# user
there are a bunch in that other room though
babafemi
@webafriq_twitter
Feb 09 2017 17:36
Hello how do i update an object using akka.persistence. If i persist after updating the object in the list, wont that object be re-added to the journal in the db?\
Will this work?
        Command<EditSuperAgentMessage>(str => Persist(str, s =>
        {
            var superagents = _superAgentMessageStore.Where(x => x.Id == str.Id).Select(x => x).FirstOrDefault();
            superagents = new CreateSuperAgentMessage(id:str.Id);
            _superAgentMessageStore.Add(superagents); //add msg to in-memory event store after persisting
        }));
babafemi
@webafriq_twitter
Feb 09 2017 17:43
Wont the journal see it as a new message?
What i meant to say was, if i the in memory representation of that object and then save snapshot, will the journal see it as a new object or an update, if i add the line
SaveSnapshot(_superAgentMessageStore);
        Command<EditSuperAgentMessage>(str => Persist(str, s =>
        {
            var superagents = _superAgentMessageStore.Where(x => x.Id == str.Id).Select(x => x).FirstOrDefault();
            superagents = new CreateSuperAgentMessage(id:str.Id);
            _superAgentMessageStore.Add(superagents); //add msg to in-memory event store after persisting
            SaveSnapshot(_superAgentMessageStore);
        }));
Or is there any thing like updateSnapshot();