通过ActiveMQ发送和接收PDF
我想通过骆驼路由将PDF发送到ActiveMQ队列。 我需要在另一条骆驼路线中提取这些PDF。 我无法从队列中提取数据。我也试过.marshal().base64()
。数据到达Message Broker,但我无法解压缩。通过ActiveMQ发送和接收PDF
错误之后会出现:
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/util/backoff/BackOff at org.apache.camel.component.jms.JmsConfiguration.chooseMessageListenerContainerImplementation(JmsConfiguration.java:466) at org.apache.camel.component.jms.JmsConfiguration.createMessageListenerContainer(JmsConfiguration.java:456).....
是否有人有想法?当使用base64编组时,该对象是org.apache.camel.converter.stream.InputStreamCache
。 该对象是org.apache.camel.component.file.GenericFile
当只发送PDF到队列。
如何提取数据以获取该PDF?
这是传递两个不同队列的代码。但是我甚至无法提取数据。
from("file:src/main/resources/test?noop=true")
.to("jms:queue:PDF")
.marshal().base64()
.to("jms:queue:BASE64_PDF")
这个例子中工作得很好
from("file:src/main/resources/test?noop=true")
.to("jms:queue:PDF");
from("jms:queue:PDF")
.to("file:src/main/resources/testReceive");
它是依赖关系的问题不是骆驼,验证您有在classpath弹簧核心xxxjar或ActiveMQ的 - 全xxjar
非常感谢! 弹簧核心依赖失踪! 它的工作原理! – sitnam
是什么你的ActiveMQ和骆驼版本? –
ActiveMQ.version 2.18,Camel.version 2.16 – sitnam
ActiveMQ.version 5.7,对不起 – sitnam