处理时出现Spring-XD错误:KafkaMessage,MessageDispatchingException:Dispatcher没有订阅者

时间:2015-05-23 07:15:08

标签: apache-kafka spark-streaming spring-xd

我正在使用Spring-XD从kafka读取主题,使用spark-streaming-processor过滤数据并将数据接收到火花中。

我用来部署流的命令是:

stream create spark-streaming-word-count --definition "kafka --zkconnect=localhost:2181 --topic=log-stream | java-word-count | log" --deploy

我得到的错误是:

2015-05-23 11:36:16,190 1.1.1.RELEASE ERROR dispatcher-1 listener.LoggingErrorHandler - Error while processing: KafkaMessage [Message(magic = 0, attributes = 0, crc = 3699841462, key = java.nio.HeapByteBuffer[pos=0 lim=6 cap=437], payload = java.nio.HeapByteBuffer[pos=0 lim=427 cap=427]), KafkaMessageMetadata [offset=26353, nextOffset=26354, Partition[topic='log-stream', id=0]]
org.springframework.messaging.MessageDeliveryException: Dispatcher has no subscribers for channel 'admin:default,admin,singlenode,hsqldbServer:9393.spark-streaming-word-count.0'.; nested exception is org.springframework.integration.MessageDispatchingException: Dispatcher has no subscribers
    at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:81)
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:277)
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:239)
    at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:115)
    at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:45)
    at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:95)
    at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutput(AbstractMessageProducingHandler.java:248)
    at org.springframework.integration.handler.AbstractMessageProducingHandler.produceOutput(AbstractMessageProducingHandler.java:171)
    at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutputs(AbstractMessageProducingHandler.java:119)
    at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:105)

请帮我解决此问题

由于

1 个答案:

答案 0 :(得分:0)

什么是流部署状态? shell命令stream list将为您提供流部署状态。另外,尝试runtime modules以查看正在运行的模块。看起来下游模块java-word-count尚未部署。