简体   繁体   English

Akka Camel:终结点上没有可用的消费者

[英]Akka Camel: No consumers available on endpoint

I am new to Akka and am attempting to use the Camel component. 我是Akka新手,正在尝试使用Camel组件。

I've simplified the code here, but basically I have a Consumer actor that consumes from a JMS endpoint. 我在这里简化了代码,但是基本上我有一个从JMS端点使用的Consumer角色。

In my integration tests, I do not wish to consume from JMS . 在集成测试中,我不希望从JMS Instead, I wish to send messages to an endpoint that my consumer reads from. 相反,我希望将消息发送到我的使用者读取的端点。

Therefore, I am attempting this "direct" approach but I get a No consumers available on endpoint: Endpoint[direct://myCamelEndpoint]. Exchange[Message: My test message] 因此,我正在尝试这种“直接”方法,但是No consumers available on endpoint: Endpoint[direct://myCamelEndpoint]. Exchange[Message: My test message] No consumers available on endpoint: Endpoint[direct://myCamelEndpoint]. Exchange[Message: My test message] exception. No consumers available on endpoint: Endpoint[direct://myCamelEndpoint]. Exchange[Message: My test message]异常。

What configuration am I missing here? 我在这里缺少什么配置?

object TestApp extends App {
  implicit val system = ActorSystem()
  val camel = CamelExtension(system)
  val producer = system.actorOf(Props[MyProducer])
  val consumer = system.actorOf(Props[MyConsumer])

  producer ! "My test message"


}

class MyProducer extends Producer {
  override def endpointUri: String = "direct:myCamelEndpoint"
}

class MyConsumer extends Consumer with ActorLogging{
  override def endpointUri: String = "direct:myCamelEndpoint"

  override def receive: Receive = {
    case event: Any => log.info("Received event {}", event)
  }
}

使用seda而不是direct,因为seda的行为更像JMS。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 骆驼-DirectConsumerNotAvailableException端点上没有可用的使用者 - Camel - DirectConsumerNotAvailableException No consumers available on endpoint 骆驼浓缩错误:终结点上没有消费者:终结点 - Camel Enrichment error: No consumers available on endpoint: Endpoint Apache Camel-JUNIT测试中的终结点上没有可用的使用者 - Apache Camel - No Consumers available on endpoint in JUNIT test Spring Boot Camel 测试 - 端点上没有可用的消费者 - Spring Boot Camel Testing - No consumers available on endpoint Apache Camel Endpoint注入直接路由“端点上没有可用的消费者” - Apache Camel Endpoint injection to direct route “No consumers available on endpoint” Akka Camel多个消费者 - Akka Camel multiple consumers Apache Camel - DirectConsumerNotAvailableException:端点上没有可用的消费者。 交换[] - Apache Camel - DirectConsumerNotAvailableException: No consumers available on endpoint. Exchange[] Apache Camel Spring Javaconfig单元测试端点上没有使用者 - Apache Camel Spring Javaconfig Unit Test No consumers available on endpoint Apache camel 2.16丰富-JUnit中的终结点上没有可用的使用者 - Apache camel 2.16 enrich - No consumers available on endpoint in JUnit Akka,Camel和ActiveMQ:限制消费者 - Akka, Camel and ActiveMQ: throttling consumers
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM