I need to provide JMS topics for external non-Akka clients from inside of 
my actor system. So far, I'm using the CamelExtension to do something like

  ..
  val factory = new 
ActiveMQConnectionFactory("vm:(broker:(tcp://localhost:61617)?persistent=false)"
 
)
  camelContext.addComponent("ext-jms", 
JmsComponent.jmsComponentAutoAcknowledge(factory))
  val exporter = system.actorOf(Props[JmsExporter], "jmsExporter")
  exporter ! "wakeup"
  ..
  class JmsExporter extends Producer {
    def endpointUri = "ext-jms:topic:test"
  }

>From the logs I see that sending messages to the jmsExporter does indeed 
create a activemq.broker.BrokerService and starts TransportConnectors for 
both vm://localhost and tcp://localhost:61617, but after the "wakeup" 
message got published the TransportConnectors are stopped and the 
BrokerService shuts down. This happens on each message.

Question 1: how do I keep the BrokerService alive and the 
TransportConnectors running so that external JMS clients can connect to 
tcp://localhost:61617 ?

Question 2: I also have (some) internal actors subscribing to the JMS 
topic, for which I want the vm://localhost connector, i.e. I want to use 
the tcp connector only for the external (non-akka) clients and avoid 
network overhead for the internal JMS actors. Is the approach above the 
right way to achieve this? 

Question 3: since I understand Akka uses EventBus instances for 
publish/subscribe - how can I have actors subscribing to an EventBus /and/ 
to a JMS topic? Just having a akka.camel.Consumer with the JMS topic 
endpointUri that also does a bus.subscribe(channel) for the internal (akka) 
subscriptions?

Thanks,
-- Peter

  

-- 
>>>>>>>>>>      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 [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/d/optout.

Reply via email to