I notice that when I define Source.Queue inside a trait that will be 
*mixedin* with other traits it will throw an exception. But if Source.Queue 
is defined in the implementation class, it works fine.   Is this suppose to 
be the correct behavior? 

trait Requests extends Actor with ActorLogging {

 import context.dispatcher

 implicit val mat: ActorMaterializer

 final val receive: Receive = { 
   case _ => initialize()
 }

 def initialize(): Unit = {
    val actorSubscriber = ActorSubscriber[UntypedOrderAndSender](anActor)
    Source.queue(0, OverflowStrategy.dropNew).to(Sink.fromSubscriber(
actorSubscriber)).run()
 }
}

class RequestsImpl(implicit val mat: ActorMaterializer) extends Request 

*Exception: *

Uncaught error from thread 
> [HttpRequestsSpec-akka.actor.default-dispatcher-4] shutting down JVM since 
> 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[RequestsSpec]
> java.lang.NoSuchMethodError: 
> akka.stream.scaladsl.Source$.queue(ILakka/stream/OverflowStrategy;)Lakka/stream/scaladsl/Source;
> at RequestsImpl$class.initialize(.scala:74)


-- 
>>>>>>>>>>      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.

Reply via email to