Java Apache驼峰路由,带兔子MQ返回“;因为找不到“的端点”;
我尝试用ApacheCamel和RabbitMQ实现一个简单的应用程序。以下是我的路线:Java Apache驼峰路由,带兔子MQ返回“;因为找不到“的端点”;,java,spring-boot,rabbitmq,apache-camel,Java,Spring Boot,Rabbitmq,Apache Camel,我尝试用ApacheCamel和RabbitMQ实现一个简单的应用程序。以下是我的路线: from("direct:startQueuePoint") .id("idOfQueueHere") .marshal(jsonDataFormat) .to("rabbitmq:tasks?hostname=localhost&port=5672&autoDelete=false&r
from("direct:startQueuePoint")
.id("idOfQueueHere")
.marshal(jsonDataFormat)
.to("rabbitmq:tasks?hostname=localhost&port=5672&autoDelete=false&routingKey=camel")
.end();
当我运行运行此路由的spring boot应用程序时,它会抛出一个错误:
因为找不到以下对象的终结点:rabbitmq://tasks?autoDelete=false&hostname=localhost&port=5672&routingKey=camel,请检查您的类路径是否包含所需的Camel组件jar
我在RabbitMQ管理控制台中创建了一个名为“tasks”的exchange,并使用路由键“camel”将其绑定到队列“task\u queue”。我可以在netstat中看到端口5672正在运行erlang exe
我不确定我在这里犯了什么错误。有人能帮我一下吗?明显的问题:你确定“camel rabbitmq”依赖项在你的类路径中吗?在看到找不到端点的错误后,我的想法是错误的。在pom.xml中添加适当的依赖项后,此问题得到解决。非常感谢。