These are chat archives for akkadotnet/akka.net

27th
Oct 2016
Peter Bergman
@peter-bannerflow
Oct 27 2016 08:47
@cduhard I have noticed the same thing but I'm not sure if its expected behavior or not, in my case I didn't want that to happend so I had to manually cancel it
Daniel Söderberg
@raskolnikoov
Oct 27 2016 09:09
New Akka.Persistence plugin for Marten https://github.com/raskolnikoov/Akka.Persistence.Marten
ollivogel
@ollivogel
Oct 27 2016 09:46
Hi everybody, I am trying to communicate to an akka.net cluster from within an Azure API App. Did anyone of you tried this out and experienced any issues?
Peter Bergman
@peter-bannerflow
Oct 27 2016 10:24
@ollivogel I think that API apps run in an app service just as web apps and in that case you are limited by the fact that you can only communicate via HTTP/HTTPS/web sockets and not open arbitrary TCP connections which is needed to join the cluster. I would guess that it is the same for API apps.
Bartosz Sypytkowski
@Horusiath
Oct 27 2016 10:52
@peter-bannerflow @ollivogel I've heard that Aaron was mentioning last week something about using websockets as a transport layer. If this will pass, you won't need to rely on open TCP ports.
Peter Bergman
@peter-bannerflow
Oct 27 2016 11:21

I think @corneliutusnea started working on some implementation of it...

@garrardkitchen I've started working on a WebSockets transport for Akka (v1.5). No ETA yet as I'm still learning it :)

ollivogel
@ollivogel
Oct 27 2016 11:47
@peter-bannerflow :-/
Alex Valuyskiy
@alexvaluyskiy
Oct 27 2016 16:38
@Aaronontheweb Is it possible to export NBench results to something else than Markdown, for example to xml. Or you know the different way to export the results to TFS or to TeamCity?
Andrey Leskov
@andreyleskov
Oct 27 2016 16:45
Hi all, can I set custom serializer for all message types, but only for persistence?
I've tried approach described in http://getakka.net/docs/persistence/custom-serialization but with no success
Andrew Young
@ayoung
Oct 27 2016 16:57
have any of you experienced akka dlls not getting copied to the bin folder?
if i have a proj that has indirect dependencies to akka via another project i find that some dlls are missing.
Andrey Leskov
@andreyleskov
Oct 27 2016 16:59
It is not akka issue for sure
Andrew Young
@ayoung
Oct 27 2016 16:59
i realize this but i can see why this would happen.
because all configuration is done in HOCON. with no real reference in the code to types in akka.cluster (for example)
so msbuild probably thinks it can optimize that out
super frustrating
same with the wire.dll too
Claudio Bernasconi
@claudiobernasconi
Oct 27 2016 17:02
As far as I know Visual Studio copies only DLLs that are references in the code. Maybe you do not reference code from the missing assemblies? If so, just set a reference to the akka assemblies in your starting assembly and configure it to copy to the output folder.
Andrew Young
@ayoung
Oct 27 2016 17:03
right. its not directly an akka issue. but i can't imagine that i'm the first one to see this issue among everyone that uses akka.
Andrey Leskov
@andreyleskov
Oct 27 2016 17:03
Also you can try to create a nuget packages and declare dependencies on akka in it. After installation to main projects all dependencies including akka will be copied \ downloaded
Andrew Young
@ayoung
Oct 27 2016 17:04
@andreyleskov i've tried that as well, still doesn't work.
i'm about to resort to post-build scripts.
Andrey Leskov
@andreyleskov
Oct 27 2016 17:05
did you add akka as explicit dependency in your nuspec file ?
Andrew Young
@ayoung
Oct 27 2016 17:05
i added it to my packages.config
Andrey Leskov
@andreyleskov
Oct 27 2016 17:06
in main project ?
Andrew Young
@ayoung
Oct 27 2016 17:07
yes. in the project with the entrypoint.
what's odd is that some dlls make it in but others don't. seems pretty arbitrary in terms of what makes it in and what doesn't.
Andrey Leskov
@andreyleskov
Oct 27 2016 17:08
in this case it is really strange, as all packages mentioned in packages.config must be installed by nuget
Andrew Young
@ayoung
Oct 27 2016 17:09
so i added the dependencies to packages.config as well as hard coded references in the code too. like this:
public static readonly Type[] References =
{
    typeof (IActorRef),
    typeof (Akka.Cluster.Cluster),
    typeof (Akka.Serialization.WireSerializer)
};
Andrey Leskov
@andreyleskov
Oct 27 2016 17:09
try to reinstall akka package, may be you've added it manually or by resharper suggestion previosly
it is a known case - you have correct packages.config, but wrong path to dlls in csproj
Andrew Young
@ayoung
Oct 27 2016 17:10
its possible. i'll try that again.
Andrey Leskov
@andreyleskov
Oct 27 2016 17:17

I'm trying to set custom serializer only for persistence as described in http://getakka.net/docs/persistence/custom-serialization
configuration:

       actor {
             serializers {
                        wire = "Akka.Serialization.WireSerializer, Akka.Serialization.Wire"
                        json = "docs.persistence.DomainEventsJsonSerializer"
             }

             serialization-bindings {
                                   "docs.persistence.DomainEvent" = json
                                   "docs.persistence.IAggregate" = json
                                   "System.Object" = wire

             }
       }

I've tried type short names, full names, assembly qualified names with no success.
All object are serialized with wire.
Next config is working fine, using assembly-qualified type names without "docs.persistence" prefix:

          actor {
             serializers {
                        wire = "Akka.Serialization.WireSerializer, Akka.Serialization.Wire"
                        json = "GridDomain.Node.DomainEventsJsonSerializer, GridDomain.Node"
             }

             serialization-bindings {
                                   "GridDomain.EventSourcing.DomainEvent, GridDomain.EventSourcing" = json
                                   "CommonDomain.IAggregate, NEventStore" = json
                                   "System.Object" = wire

             }
       }

But it also affects messages serialization when sending over network. How to avoid this?

Andrew Young
@ayoung
Oct 27 2016 17:46
@andreyleskov so what you're saying is that we typically have to add all akka dependencies up the project chain?
Andrey Leskov
@andreyleskov
Oct 27 2016 17:48
yes, as all others. It will allow msbuild be aware what libraries it should copy. We use nuget packages with explicit dependencies to allow nuget install and package restore do all work.
Andrew Young
@ayoung
Oct 27 2016 17:50
ok. this has not been typically been my experience. msbuild normally just knows what dlls to copy over even if it is not explicitly added to the top-level proj.
but maybe this is a special case because there are no references in code to some akka libs
Christian Duhard
@cduhard
Oct 27 2016 18:37
I am seeing these log messages all of s sudden. "TcpPackageConnection: connected to [{0}, L{1}, {2:B}]." with the SourceContext of akka://.../deadletters
first time through some messages pass no problem. send some more I start seeing those log messages and nothing arrives
Damian Reeves
@DamianReeves
Oct 27 2016 19:42
Has anyone successfully invoked MultiNode tests from within Visual Studio, is this possible?
Gregorius Soedharmo
@Arkatufus
Oct 27 2016 19:49
sorry for being a complete paranoid noob here, is it ok to share static variables between router workers, or is it better to treat each worker as separate entities? i'm worried that it may affect remote deployment later on
Jay DeBoer
@jaydeboer
Oct 27 2016 21:43

Hey everyone, Akka noob here. I am working on trying to use Akka.Persistence work with the Redis plugin. I have the sample actors working with persistence as I can force them to restart and they will restore state perfectly. I've added the Redis package and my config is as follows:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="akka"
             type="Akka.Configuration.Hocon.AkkaConfigurationSection, Akka" />
  </configSections>

  <akka>
    <hocon>
      <![CDATA[
        akka {
            # here we are configuring log levels
            log-config-on-start = on
            stdout-loglevel = INFO
            loglevel = INFO
        }
        akka.persistence {
                journal {
                    redis {
                        # qualified type name of the Redis persistence journal actor
                        class = "Akka.Persistence.Redis.Journal.RedisJournal, Akka.Persistence.Redis"

                        # connection string, as described here: https://github.com/StackExchange/StackExchange.Redis/blob/master/Docs/Configuration.md#basic-configuration-strings
                        configuration-string = "127.0.0.1"

                        # dispatcher used to drive journal actor
                        plugin-dispatcher = "akka.actor.default-dispatcher"

                        #Redis journals key prefixes. Leave it for default or change it to appropriate value. WARNING: don't change it on production instances.
                        key-prefix = "akka:persistence:journal"
                    }
                }    

                snapshot-store {
                    redis {
                        # qualified type name of the Redis persistence snapshot storage actor
                        class = "Akka.Persistence.Redis.Snapshot.RedisSnapshotStore, Akka.Persistence.Redis"

                        # connection string, as described here: https://github.com/StackExchange/StackExchange.Redis/blob/master/Docs/Configuration.md#basic-configuration-strings
                        configuration-string = "127.0.0.1"

                        # dispatcher used to drive snapshot storage actor
                        plugin-dispatcher = "akka.actor.default-dispatcher"

                        #Redis storage key prefixes. Leave it for default or change it to appropriate value. WARNING: don't change it on production instances.
                        key-prefix = "akka:persistence:snapshots"
                    }
                }
            }

      ]]>
    </hocon>
  </akka>
</configuration>

The app runs, but nothing is saved to Redis. I can telnet into 127.0.0.1 on the default port and Redis is up and running fine.

I've downloaded the source for the Akka.Persistence.Redis package and am referencing that in my sample app. I do not hit any breakpoints in the Redis plugin source. This leads me to believe that my configuration is not right. As far as I can tell, the RedisSettings constructor is never called. Can anyone suggest where I may be going wrong with this?