Have you switched to Scala?
Otherwise the java sample code is here:
http://doc.akka.io/docs/akka/2.2.3/contrib/distributed-pub-sub.html#A_Small_Example_in_Java

/Patrik




On Wed, Jan 22, 2014 at 3:19 PM, √iktor Ҡlang <viktor.kl...@gmail.com>wrote:

> Hi Amit,
>
> On Wed, Jan 22, 2014 at 3:07 PM, Amit Mula <amitm...@gmail.com> wrote:
>
>> hi guys,
>>
>> I think i am still stuck,
>>
>> A simple actor that publishes to this "content" topic:
>>
>>
>>    1. class Publisher extends Actor {
>>    2.   import DistributedPubSubMediator.Publish
>>    3.   // activate the extension
>>    4.   val mediator = DistributedPubSubExtension(context.system).mediator
>>    5.
>>    6.   def receive = {
>>    7.     case in: String ⇒
>>    8.       val out = in.toUpperCase
>>    9.       mediator ! Publish("content", out)
>>    10.   }
>>    11. }
>>
>> how do i get a reference of context in the above code ?
>> compiler says : *error: not found: value context*
>> I am using maven to build
>>
>>
> All our code samples are compiled and tested as a part of the build so
> something is wrong is your build definition.
>
> Cheers,
> √
>
>
>>  --
>> >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com.
>> To post to this group, send email to akka-user@googlegroups.com.
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> --
> Cheers,
> √
>
> * ——————— **Viktor Klang*
> *Chief Architect - **Typesafe <http://www.typesafe.com/>*
>
>  Twitter: @viktorklang
>
> --
> >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> 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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
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