Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 08:35

    Aaronontheweb on dev

    Fix build script to be able to … (compare)

  • 08:35
    Aaronontheweb closed #3924
  • 08:28
    Aaronontheweb synchronize #3927
  • 08:28
    Aaronontheweb synchronize #3924
  • 08:28

    Aaronontheweb on dev

    added updated Windows Release p… Merge pull request #3869 from A… Fixed Akka.Remote.ResendUnfulfi… and 6 more (compare)

  • 08:28
    Aaronontheweb closed #3932
  • 08:22
    Aaronontheweb opened #3932
  • 08:16

    Aaronontheweb on 1.3.15

    (compare)

  • 08:14

    Aaronontheweb on master

    Fixed Akka.Remote.ResendUnfulfi… added v1.4.0-beta2 release note… added Akka.NET v1.3.15 release … and 2 more (compare)

  • 08:14
    Aaronontheweb closed #3931
  • 08:11
    Aaronontheweb synchronize #3931
  • 07:59
    Aaronontheweb commented #3905
  • 07:58
    Aaronontheweb edited #3931
  • 07:57
    Aaronontheweb commented #3889
  • 07:54
    Aaronontheweb synchronize #3931
  • 07:49
    Aaronontheweb opened #3931
  • 07:41
    Aaronontheweb closed #3930
  • 07:41
    Aaronontheweb commented #3930
  • 07:34
    Aaronontheweb opened #3930
  • 07:22
    Aaronontheweb synchronize #3924
Bartosz Sypytkowski
@Horusiath
@to11mtm true, we wanted to warn people using default serializer, that's why from the next release if you have json.net serializer configured as default, you'll receive warning, that it's going to be obsoleted after v1.5
I feel bad about rellying on default serializer for persistence. Some persistence libs already avoided that, providing their own defaults
to11mtm
@to11mtm
...speaking of... are there any Oracle Persistence libraries out there that anyone is aware of?
Bartosz Sypytkowski
@Horusiath
Christian Duhard
@cduhard
@Horusiath EventStore requires json if you want to use the built in projection framework
Bartosz Sypytkowski
@Horusiath
@cduhard you can always use custom json provider, the one akka uses is quite heavily oriented for akka-specific needs
Christian Duhard
@cduhard
it's a little late for that :)
we've got 100's of millions of events in the eventstore using the current default serializer
Bartosz Sypytkowski
@Horusiath
nice to hear - I don't know it eventstore provider doesn't use its own json configuration thou
Christian Duhard
@cduhard
there isn't a well supported version
i am sorta maintaining my own version
eventstore doesn't require json. if you want to use the native projection engine (v8) is has to be able to parse your events
i think they mentioned supporting a pluggable serializer at some point. MsgPack or proto-buf would be nice
ilhadad
@ilhadad
I have a receive actor that has both a ReceiveAny and Unhandled method. I am getting in the console log Got unhandled message From:akka://all-system/. Not sure why the message is not delivered.
Yin Zhang
@melcloud
@ilhadad can you provide your code example and akka config?
ilhadad
@ilhadad
sure here it is...
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <sectionGroup name="couchbaseClients">
      <section name="couchbase" type="Couchbase.Configuration.Client.Providers.CouchbaseClientSection, Couchbase.NetClient" />
    </sectionGroup>
    <section name="akka" type="Akka.Configuration.Hocon.AkkaConfigurationSection, Akka" />
  </configSections>

  <startup> 
      <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
  </startup>

  <akka>
    <hocon>
      <![CDATA[

                akka {
                    # here we are configuring log levels
                    log-config-on-start = off
                    stdout-loglevel = DEBUG
                    loglevel = DEBUG

          // Define an Nlog logger for the Akka system
          loggers = ["Akka.Logger.NLog.NLogLogger, Akka.Logger.NLog"]

            actor {
              provider = "Akka.Cluster.ClusterActorRefProvider, Akka.Cluster"
            }

            remote {
                            log-remote-lifecycle-events = DEBUG
                            log-received-messages = on

            helios.tcp {
                                transport-class = "Akka.Remote.Transport.Helios.HeliosTcpTransport, Akka.Remote"
                                applied-adapters = []
                                transport-protocol = tcp
                                #will be populated with a dynamic host-name at runtime if left uncommented
                                #public-hostname = "POPULATE STATIC IP HERE"
                                hostname = "127.0.0.1"
                                port = 8777
              }
            }

            cluster {
              seed-nodes = ["akka.tcp://SSAActorSystem@127.0.0.1:4053"]
              #role = ["httpbridge"]

              auto-down-unreachable-after = 30s
            }



        akka.persistence{
                    journal{
                        plugin = "akka.persistence.journal.couchbase"
                        couchbase:{
                            class = "Akka.Persistence.CouchBase.Journal.CouchBaseDbJournal, Akka.Persistence.CouchBase"
                            ServersURI:[
                                "http://127.0.0.1:8091"
                            ],
                            BucketName = "testakka",
                            BucketUseSsl = false,
                            Password = "",
                            DefaultOperationLifespan = 2000,
                            PoolConfiguration.MaxSize = 10,
                            PoolConfiguration.MinSize = 5,
                            SendTimeout = 12000
                        }
                    }

                    snapshot-store{
                        plugin = "akka.persistence.snapshot-store.couchbase"
                        couchbase:{
                            class = "Akka.Persistence.CouchBase.Snapshot.CouchBaseDbSnapshotStore, Akka.Persistence.CouchBase"
                            ServersURI:[
                                "http://127.0.0.1:8091"
                                ],
                                BucketName = "testakka",
                                BucketUseSsl = false,
                                Password = "",
                                DefaultOperationLifespan = 2000,
                                PoolConfiguration.MaxSize = 10,
                                PoolConfiguration.MinSize = 5,
                                SendTimeout = 12000
                            }
                        }
                    }  
                }

            ]]>
    </hocon>
  </akka>

  <couchbaseClients>
    <couchbase useSsl="false">
      <servers>
        <add uri="http://127.0.0.1:8091"></add>
      </servers>
      <buckets>
        <!--<add name="default" useSsl="false" password="" operationLifespan="2000">
                    <connectionPool name="custom" maxSize="10" minSize="5" sendTimeout="12000"></connectionPool>
                </add>-->
        <add name="testakka" useSsl="false" password="" operationLifespan="2000">
          <connectionPool name="custom" maxSize="10" minSize="5" sendTimeout="12000"></connectionPool>
        </add>
      </buckets>
    </couchbase>
  </couchbaseClients>

  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
To add more color to my help request. The actor in question is residing in the node and not remotely.
Aaron Stannard
@Aaronontheweb
which message showed up in Unhandled?
ilhadad
@ilhadad
It did not call it.
or the receiveany
Aaron Stannard
@Aaronontheweb
can you spell it out for us?
which message, which actor, and when
if it's a big complicated user-defined actor, NBD - but put some meat on the bones
also - which version of Akka.NET? latest stable?
ilhadad
@ilhadad

Latest akka from nuget.
here is the call to the actor...

            SSAActorSystem.ActorReferences.HTTPClientBridge.Tell(new HTTPSourcedCommand(c, Context.User.Identity.Name, Context.ConnectionId), ActorRefs.Nobody);

Here is how i instantiate the actor...

            //Instantiate the HTTPClient BridgeActor
            ActorReferences.HTTPClientBridge = _ActorSystem.ActorOf(
                Props.Create(() => new HTTPClientBridgeActor(_HTTPClientEventPusher, new IActorRef[] { ActorReferences.ClientList })),
                "HTTPClientBridge"
                );

Here is the actor itself...


    public class HTTPClientBridgeActor:ReceiveActor
    {
        private ILoggingAdapter _logger = Context.GetLogger();

        private static string _ActorType = typeof(HTTPClientBridgeActor).Name;


        public HTTPClientBridgeActor(IHTTPClientInterface httpClientEventInterface, IActorRef[] Supervisors) 
        {

            Become(Initializing);
        }

        #region Actor States

        /// <summary>
        /// This method sets the actor so that it can "boot" itself up.
        /// </summary>
        private void Initializing()
        {
            _logger.Debug("Actor {0} is initializing.", _ActorType);

            // This catch all will log if there are any weird unhandled messages.
            Receive<object>(o =>
            {
                _logger.Debug("{1} Got unhandled message From:{0}", Sender.Path.ToStringWithAddress(),_ActorType);
            });

            _logger.Debug("Actor {0} is Initialized, moving to Ready state.", _ActorType);

            Become(Ready);

        }

        /// <summary>
        /// The command processing state sets this actor ready to receive any command from other actors.
        /// </summary>
        private void Ready()
        {
            _logger.Debug("Actor {0} is getting Ready.", _ActorType);

            // Process Commands that are coming from external clients
            Receive<HTTPSourcedCommand>(c => ProcessExternalHTTPClientCommandHandler(c));
            Receive<string>(s=> HandleStringCommand(s));

            // This catch all will log if there are any weird unhandled messages.
            ReceiveAny(o =>
            {
                _logger.Debug("{1} got unhandled message from:{0} Unhandled Message:{1}", Sender.Path.ToStringWithAddress(), o.GetType().Name, _ActorType);
            });


            _logger.Debug("Actor {0} is Ready.", _ActorType);

        }

        #endregion Actor States


        protected override void Unhandled(object message)
        {
            //Do something with the message.
        }
... more code after this
Here is the message that is being sent...
    public class HTTPSourcedCommand
    {
        public HTTPSourcedCommand()
        {

        }

        public HTTPSourcedCommand(string commandType, string area, string id = null, string fieldName = null, object data = null, string user = null)
        {
            CommandType = commandType;
            Data = data;
            Area = area;
            FieldName = fieldName;
            Id = id;
            User = user;
        }

        /// <summary>
        /// Returns a copy of the original command with the user name added.
        /// </summary>
        /// <param name="originalCommand"></param>
        /// <param name="user">user name</param>
        public HTTPSourcedCommand( HTTPSourcedCommand originalCommand,string user,string connectionId)
        {
            CommandType = originalCommand.CommandType;
            Data = originalCommand.Data;
            Area = originalCommand.Area;
            FieldName = originalCommand.FieldName;
            Id = originalCommand.Id;
            User = user;
            ConnectionId = connectionId;
        }


        [JsonProperty]
        public string CommandType { get; private set; }
        [JsonProperty]
        public object Data { get; private set; }
        [JsonProperty]
        public string Area { get; private set; }
        [JsonProperty]
        public string FieldName { get; private set; }
        [JsonProperty]
        public string Id { get; private set; }
        [JsonProperty]
        public string User { get; private set; }
        [JsonProperty]
        public string ConnectionId { get; private set; }

    }
Aaron Stannard
@Aaronontheweb
Become call in the constructor
there's your problem
just call Initializing
we had an issue logged about that somewhere
but in general - don't call Become for behavior #1
only call it when switching from one active behavior to another
there's stuff inside the behavior stack still being initialized when the actor instance is being constructed
ilhadad
@ilhadad
It seemed to call the Initializing method.
Aaron Stannard
@Aaronontheweb
so what behavior is the actor in when the issue occurs?
initializing or ready
ilhadad
@ilhadad
Ready
Initializing is called and then it calls ready.
Aaron Stannard
@Aaronontheweb
we might have fixed the Become in the constructor bug then
and so ReceiveAny misses a message?
ilhadad
@ilhadad
Here's the console output...
2016-04-04 18:10:16.6303|INFO|EY.SSA.ActorSystemBridge.Program|Starting SSA Actor System at HTTP Client Bridge at:CF_IHadad
[DEBUG][4/4/2016 10:10:16 PM][Thread 0008][EventStream] StandardOutLogger started
[INFO][4/4/2016 10:10:16 PM][Thread 0015][[akka://SSAActorSystem/system/log1-NLogLogger]] NLogLogger started
[DEBUG][4/4/2016 10:10:16 PM][Thread 0008][EventStream(SSAActorSystem)] Logger log1-NLogLogger [NLogLogger] started
[DEBUG][4/4/2016 10:10:16 PM][Thread 0008][EventStream(SSAActorSystem)] StandardOutLogger being removed
2016-04-04 18:10:16.9651|INFO|EY.SSA.ActorSystemBridge.Program|Started SSA Actor System at HTTP Client Bridge at:CF_IHadad
2016-04-04 18:10:36.2219|DEBUG|EY.SSA.CommonBusinessLogic.Actors.HTTPClientBridgeActor|Actor HTTPClientBridgeActor is initializing.
2016-04-04 18:10:38.6722|DEBUG|EY.SSA.CommonBusinessLogic.Actors.HTTPClientBridgeActor|Actor HTTPClientBridgeActor is Initialized, moving to Ready state.
2016-04-04 18:10:38.6922|INFO|EY.SSA.ActorSystemBridge.Program|HTTP Server running on http://localhost:8080
2016-04-04 18:10:38.7037|DEBUG|EY.SSA.CommonBusinessLogic.Actors.HTTPClientBridgeActor|Actor HTTPClientBridgeActor is getting Ready.
Enter a command:
2016-04-04 18:10:38.7197|DEBUG|EY.SSA.CommonBusinessLogic.Actors.HTTPClientBridgeActor|Actor HTTPClientBridgeActor is Ready.
2016-04-04 18:10:49.7208|DEBUG|EY.SSA.CommonBusinessLogic.Actors.HTTPClientBridgeActor|HTTPClientBridgeActor Got unhandled message From:akka://all-systems/
2016-04-04 18:10:49.7354|DEBUG|EY.SSA.CommonBusinessLogic.Actors.HTTPClientBridgeActor|HTTPClientBridgeActor Got unhandled message From:akka://all-systems/
Yep. it is as if the actor never received it.
Aaron Stannard
@Aaronontheweb
ok, so it looks like the Receive<object> you set in the `Initialzing state is still there
because that's your own debug message showing up
ilhadad
@ilhadad
Oh yeah
I see that.
wierd.
Aaron Stannard
@Aaronontheweb
I'm wondering if this did something funny to the first behavior
ilhadad
@ilhadad
So should I just call Initializing from the constructor?
just to test?