--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
I saw that camel integration has not been ported over to Akka 2.0 and
we needed to get this implementation going. Was really reluctant to
use lower version of Akka given 2.0 is a much improved version
(gathered that sense from reading documentation). In this situation
what best solution you can think of with Akka 2.0?
Thanks. Unfortunately building locally to trying it out isn't an
option given tighten policies of the firm where I work. They have
blocked repos and really come after us if we deploy softwares that
aren't released. I appreciate your suggestion though.
Anything else you can think of? Can this not be achieved w/o camel
using Akka 2.0? Like having a Worker actor which consume message from
a common queue and then with pattern matching find out message type,
put the message into appropriate destination queue?
Your rock. I am impressed with your response time Victor:) Appreciate
it.
Now with this, I'll have to make actor transactional to perform this
use case? e.g. retrieve message from queue A-->check message type--
>put message into queue B. Should this be a synchronous actor?
Eventually I ended up downgrading to settle with 1.3 to leverage akka
camel integration.
I have a question on creating mulitple instances of Mediation and
Producer actors for the following type of code (influenced from Akka
camel 1.3 doc)
class ConsumerActor(mediator: ActorRef) extends Actor with Consumer {
def receive = {
case msg: Message => mediator.forward(msg.setBodyAs[String])
}
....
}
class Mediator(producer: ActorRef) extends Actor {
def receive ={
....
case msg:Message =>producer.forward
}
}
And producer is
class ProducerActor extends Actor with Producer {
def endpointUri = "direct:welcome"
}
These actors are started as
val producer = actorOf[ProducerActor]
val mediator = actorOf(new Mediator(producer))
val consumer = actorOf(new ConsumerActor(mediator))
Check this out:
class JmsConsumer extends Consumer{
def endpointUri = "jms:queue:Orders"
protected def receive = {
case msg => println("Received [%s]" format msg)
}
}
object JmsConsumerApp extends App{
val sys = ActorSystem("test")
val connectionFactory = ...
CamelExtension(sys).context.addComponent(new JmsComponent(new JmsConfiguration(connectionFactory)))
sys.actorOf(Props[JmsConsumer])
}
And more here:
http://skillsmatter.com/podcast/scala/akka-2-x
Piotr Gabryanczyk
-
Blog: http://blog.scala4java.com
Twitter: @piotrga
This is scary...
Way too much code for my taste... :)
Check this out:
class JmsConsumer extends Consumer{
def endpointUri = "jms:queue:Orders"
protected def receive = {
case msg => println("Received [%s]" format msg)
}
}
object JmsConsumerApp extends App{
val sys = ActorSystem("test")
val connectionFactory = ...
CamelExtension(sys).context.addComponent(new JmsComponent(new JmsConfiguration(connectionFactory)))
sys.actorOf(Props[JmsConsumer])
}