I came across the post that says akka flushes the entity if not declated strict, If thats right can any one help me as to how do i declare my jobDetailsEntity as `strict `
On Sunday, July 9, 2017 at 9:14:14 PM UTC+5:30, vishal...@exadatum.com wrote: > > > > down votefavorite > <https://stackoverflow.com/questions/44950948/akka-http-error-substream-source-cannot-be-materialized-more-than-once-if-payl/44957248#> > > I am working with Akka Http, where I have defined a route as > > val route = (path(HttpConstants.CreateJob) & post) { > (entity(as[JobDetailsEntity]) & entity(as[JobEntity])) { > (jobDetailsEntity: JobDetailsEntity, jobEntity: JobEntity) => > val updatedJobEntity = jobEntity.copy(runningSince = > DateTime.now().getMillis) > val updatedJobDetailsEntity = jobDetailsEntity.copy(runningSince = > DateTime.now().getMillis).copy(modify_date = DateTime.now().getMillis) > complete { > createJobDetails(updatedJobDetailsEntity).map(_.asJson) > createJob(updatedJobEntity).map(_.asJson) > } > } > > Here I am trying to unmarshal two entites in the same POST call which > works when my json Payload id small i.e few bytes then its works fine , as > soon as the payload size increases i.e around 10-20 kb it throws error : > > Substream Source cannot be materialized more than once > > -- *DISCLAIMER:* This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you should not disseminate, distribute or copy this email. Please notify the sender immediately by email if you have received this email by mistake and delete this email from your system. Email transmission cannot be guaranteed to be secure or error-free, as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender, therefore, does not accept liability for any errors or omissions in the contents of this message which arise as a result of email transmission. If verification is required, please request a hard-copy version. -- >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.