Hi Eugene,

It's not possible, as far as I know.

Messages are internally wrapped in Envelope(msg: Any, sender: ActorRef)

The Any type means that it will be boxed.

Cheers,
Patrik


On Tue, Jan 7, 2014 at 2:31 PM, Eugene Vigdorchik <
[email protected]> wrote:

> Hi list,
> I'm developing a solution for monitoring akka applications with
> rxjava-scala: http://github.com/vigdorchik/rxmon
> The application should contain actor(s), that should periodically send
> statistics to the monitor actor. To achieve best performance I want raw
> data of primitive numeric type be sent.
> However what I see is that the boxed values are received.
>
> import akka.actor._
> import scala.reflect.ClassTag
>
> val boxedTag = ClassTag(classOf[java.lang.Integer])
>
> class Test extends Actor {
>   def receive = {
>     case ClassTag.Int(_) => println("unboxed")
>     case boxedTag(_) => println("boxed")
>   }
> }
>
> val s = new ActorSystem("system")
>
> val t = s.actorOf(Props(new Test), "test")
>
> t ! 77 // prints boxed
>
> So my questions are:
> a) is it akka boxing the value?
> b) is it possible to somehow send unboxed values?
>
> Thank you,
> Eugene.
>
>  --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ: http://akka.io/faq/
> >>>>>>>>>> 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 http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 

Patrik Nordwall
Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
Twitter: @patriknw

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: http://akka.io/faq/
>>>>>>>>>>      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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to