Đây là dự án khởi động mùa xuân đơn giản (phiên bản 1.5.2
) để chứng minh vấn đề:Tại sao ActiveMQ 5.14.x không thể bắt đầu nhúng với lạc đà-jms phần 2.18.3
https://github.com/lanwen/camel-jms-activemq-test
Nó có Apache Camel phiên bản 2.18.3
Mở chi nhánh master
tất cả hoạt động tốt vì activemq-camel=5.14.4
và camel-jms=2.16.3
(được transitively từ nó)
mùa xuân bắt đầu bình thường với nhật ký:
2017-04-22 00:53:19.647 INFO 97217 --- [ main] o.a.camel.spring.SpringCamelContext : Apache Camel 2.18.3 (CamelContext: camel-1) is starting
2017-04-22 00:53:19.662 INFO 97173 --- [ main] o.apache.activemq.broker.BrokerService : Apache ActiveMQ 5.14.4 (localhost, ID:lanwen-osx3.local-62145-1492811599544-0:1) is starting
2017-04-22 00:53:19.665 INFO 97173 --- [ main] o.apache.activemq.broker.BrokerService : Apache ActiveMQ 5.14.4 (localhost, ID:lanwen-osx3.local-62145-1492811599544-0:1) started
2017-04-22 00:53:19.665 INFO 97173 --- [ main] o.apache.activemq.broker.BrokerService : For help or more information please see: http://activemq.apache.org
2017-04-22 00:53:19.682 INFO 97173 --- [ main] o.a.activemq.broker.TransportConnector : Connector vm://localhost started
2017-04-22 00:53:19.702 INFO 97173 --- [ main] o.a.camel.spring.SpringCamelContext : Route: route1 started and consuming from: activemq://queue:to-write?asyncConsumer=true
2017-04-22 00:53:19.703 INFO 97173 --- [ main] o.a.camel.spring.SpringCamelContext : Total 1 routes, of which 1 are started.
2017-04-22 00:53:19.704 INFO 97173 --- [ main] o.a.camel.spring.SpringCamelContext : Apache Camel 2.18.3 (CamelContext: camel-1) started in 0.466 seconds
2017-04-22 00:53:19.709 INFO 97173 --- [ main] ru.yandex.test.writer.MyTestApplication : Started MyTestApplication in 2.437 seconds (JVM running for 2.911)
Nhưng khi bạn bắt đầu với camel-jms=2.18.3
(như các phiên bản chính của lạc đà, trên nhánh not_working)
Mọi thứ đi sai với log này:
2017-04-22 00:56:38.070 INFO 97195 --- [ main] o.a.camel.spring.SpringCamelContext : Apache Camel 2.18.3 (CamelContext: camel-1) is starting
...
2017-04-22 00:56:43.590 WARN 97195 --- [ActiveMQ Task-1] o.a.a.t.failover.FailoverTransport : Failed to connect to [tcp://localhost:61616] after: 10 attempt(s) continuing to retry.
Nhưng nếu chúng tôi thay đổi activemq-camel
thành 5.13.4
với camel-jms=2.18.3
hoạt động tốt trở lại ...
Tại sao ActiveMQ 5.14.x không hoạt động với lạc đà-jms 2.18.x?
Tôi có dự án với phiên bản lạc đà = 2.18.0 và activeMQ-version = 5.14.1 và nó hoạt động tốt. Có thể thêm một số dấu vết? –
Bạn đã thử dự án mẫu? https://github.com/lanwen/camel-jms-activemq-test. Ngoài ra hãy kiểm tra xem phiên bản lạc đà-jms của bạn có phải là 2.16.x – lanwen