在Spring云数据流中获取ReplyRequiredException

时间:2017-02-02 15:52:19

标签: spring-integration spring-cloud-stream spring-cloud-dataflow

我正在尝试Spring云数据流。我创建了一个'source'为“maven://org.springframework.cloud.stream.app:file-source-kafka:1.0.2.RELEASE”的流,我编写了自定义处理器,'sink'是“行家://org.springframework.cloud.stream.app:登录灌入卡夫卡:1.0.2.RELEASE”。源从特定目录读取文件,并将文件的引用传递给处理器。但我在处理器中看到以下异常。处理器的属性如下所示

spring.application.name=data-processor
spring.cloud.stream.defaultBinder=kafka
spring.cloud.stream.kafka.binder.zkNodes=zookeeper
spring.cloud..stream.kafka.binder.brokers=kafka
spring.cloud..stream.bindings.input.destination=dataProcessor
spring.cloud..stream.bindings.output.destination=log
Error while processing: KafkaMessage [Message(magic = 0, attributes = 0, crc = 4142235045, key = null, payload = java.nio.HeapByteBuffer[pos=0 lim=116 cap=116]), KafkaMessageMetadata [offset=1, nextOffset=2, Partition[topic='Stream.file', id=0]]

org.springframework.integration.handler.ReplyRequiredException: No reply produced by handler 'dataImporterProcessor.process.transformer.handler', and its 'requiresReply' property is set to true.
    at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:109) ~[spring-integration-core-4.2.5.RELEASE.jar!/:na]
    at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:127) ~[spring-integration-core-4.2.5.RELEASE.jar!/:na]
    at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116) ~[spring-integration-core-4.2.5.RELEASE.jar!/:na]
    at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:147) ~[spring-integration-core-4.2.5.RELEASE.jar!/:na]
    at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:120) ~[spring-integration-core-4.2.5.RELEASE.jar!/:na]
    at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:77) ~[spring-integration-core-4.2.5.RELEASE.jar!/:na]
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:442) ~[spring-integration-core-4.2.5.RELEASE.jar!/:na]
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:392) ~[spring-integration-core-4.2.5.RELEASE.jar!/:na]
    at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:115) ~[spring-messaging-4.2.6.RELEASE.jar!/:4.2.6.RELEASE]
    at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:45) ~[spring-messaging-4.2.6.RELEASE.jar!/:4.2.6.RELEASE]
    at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:105) ~[spring-messaging-4.2.6.RELEASE.jar!/:4.2.6.RELEASE]

0 个答案:

没有答案