visual studio 2017 - How to use Appsetting configuration for Akka.Net 1.3.0 Configuration in Asp.net core -


i have been playing around new version of akka.net support .netstandard 1.6 in visual studio 2017. due peculiarity of akka.net configuration uses hocon format configuration. previous version embeds easy-to-read hocon configuraton inside app.config or web.config. option use configurationfactory.parsestring method accepts string object. parsing hocon string handy small configuration sections. in case, left parsestring configuration didn't work expected. came this:

 var configstring = @"akka {         log-config-on-start = on         stdout-loglevel = info         loglevel = debug         loggers= ""[akka.logger.serilog.seriloglogger, akka.logger.serilog]""         actor {                      debug {                         receive = on                         autoreceive = on                         lifecycle = on                         event-stream = on                         unhandled = on                     }               }      akka.persistence {         journal {                     plugin = ""akka.persistence.journal.sqlite""                      sqlite {                                     class = ""akka.persistence.sqlite.journal.sqlitejournal, akka.persistence.sqlite""                                         plugin-dispatcher = ""akka.actor.default-dispatcher""                                         connection-string = ""data source = f:\\sqlitedb\\sample.db3""                                       table-name = event_journal                                     metadata-table-name = journal_metadata                                     auto-initialize = on                              }                     }      snapshot-store {         plugin = ""akka.persistence.snapshot-store.sqlite""         sqlite {             class = ""[akka.persistence.sqlite.snapshot.sqlitesnapshotstore, akka.persistence.sqlite]""             connection-string = ""data source = f:\\sqlitedb\\sample.db3""             table-name = snapshot_store             auto-initialize = on          } }  }       ";         var config = configurationfactory.parsestring(configstring);          actorsystem.create("akkasystem", config); 

which didn't work expected. how configure akka.net in asp.net core using appsetting.json? or there better way of doing this?


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -