Try to use a java.util.List<String> as the value for the contact points configuration. One address in each element of the list. I'm not sure if it works.
/Patrik tis 24 maj 2016 kl. 23:35 skrev Yan Pei <[email protected]>: > I am trying to dynamically set up value for > cassandra-journal.contact-points. > > If I am using ConfigFactory.parseString(). It works well. > String name = "cassandra-journal.contact-points="; > String contactPoints = name + "[ipaddress, ipaddres]"; > Config overrides = ConfigFactory.parseString(contactPoints); > Config actualConfig = overrides.withFallback(ConfigFactory.load()); > ActorSystem system = ActorSystem.create("actor-system", actualConfig); > > But if I use Map, it complain about > Failed to initialize CassandraSession. It will be retried on demand. > Caused by: hardcoded v > alue: contact-points has type STRING rather than LIST > > Map<String, Object> configurations = new HashMap<String, Object>(); > String contactPoints = envHelper.getContactPoints(); > configurations.put("cassandra-journal.contact-points", "[ipaddress, > ipaddress]"); > Config overrides = ConfigFactory.parseMap(configurations); > Config actualConfig = overrides.withFallback(ConfigFactory.load()); > ActorSystem system = ActorSystem.create("actor-system", actualConfig); > > > I need to use Map since there are more than one thing I need to configure. > > How to resolve this issue? > > Thanks and Best Regards, > Yan > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: > http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
