لم يتم تعريف أي أداة استقصاء لمهايئ نقطة النهاية الصادر
-
21-12-2019 - |
سؤال
سأتعامل مع هذا الخطأ
"لم يتم تحديد أي أداة استقصاء لنقطة النهاية 'importExchangesOutboundAdapter'".فيما يلي التكوين الخاص بي لتقطيع دفعة الربيع عن بعد.
أنا أستخدم التكامل الربيعي AMQP.
<rabbit:connection-factory id="connectionFactory"
port="${rabbitmq.port}" host="${rabbitmq.host}" username="${rabbitmq.username}"
password="${rabbitmq.password}" />
<rabbit:template id="amqpTemplate"
connection-factory="connectionFactory">
</rabbit:template>
<rabbit:queue name="${import.exchanges.queue}" />
<rabbit:queue name="${import.exchanges.reply.queue}" />
<int:channel id="importExchangesChannel">
<int:queue />
</int:channel>
<int:channel id="importExchangesReplyChannel">
<int:queue />
</int:channel>
<beans:bean id="importExchangesMessagingTemplate"
class="org.springframework.integration.core.MessagingTemplate"
p:defaultChannel-ref="importExchangesChannel" p:receiveTimeout="${import.exchanges.reply.timeout}">
</beans:bean>
<amqp:outbound-channel-adapter id="importExchangesOutboundAdapter"
channel="importExchangesChannel" />
<amqp:inbound-channel-adapter id="importExchangesInboundAdapter"
connection-factory="connectionFactory" channel="importExchangesReplyChannel"
queue-names="${import.exchanges.reply.queue}" />
<beans:bean id="importExchangesChunkItemWriter"
class="org.springframework.batch.integration.chunk.ChunkMessageChannelItemWriter"
scope="step" p:messagingOperations-ref="importExchangesMessagingTemplate"
p:replyChannel-ref="importExchangesReplyChannel">
</beans:bean>
<beans:bean id="importExchangesChunkHandler"
class="org.springframework.batch.integration.chunk.RemoteChunkHandlerFactoryBean"
p:chunkWriter-ref="importExchangesChunkItemWriter" p:step-ref="importExchangesStep">
</beans:bean>
<amqp:inbound-channel-adapter id="importExchangesSlaveInboundAdapter"
connection-factory="connectionFactory" channel="${import.exchanges.queue}Channel"
queue-names="${import.exchanges.queue}" />
<amqp:outbound-channel-adapter id="importExchangesSlaveOutboundAdapter"
channel="importExchangesReplyChannel" />
<int:service-activator id="serviceActivatorExchanges"
input-channel="importExchangesChannel" output-channel="importExchangesReplyChannel"
ref="chunkProcessorChunkHandlerExchanges" method="handleChunk" />
<beans:bean id="chunkProcessorExchanges"
class="org.springframework.batch.core.step.item.SimpleChunkProcessor"
p:itemWriter-ref="importExchangesItemWriter" />
<beans:bean id="chunkProcessorChunkHandlerExchanges"
class="org.springframework.batch.integration.chunk.ChunkProcessorChunkHandler"
p:chunkProcessor-ref="chunkProcessorExchanges" />
المحلول
نقطة النهاية المحددة الخاصة بك importExchangesOutboundAdapter
التي لديها قناة importExchangesChannel
لاستطلاع الرسائل من لأن القناة هي Queue
القناة التي تتطلب تكوين أداة الاستقصاء لاستهلاك الرسائل.
الإجابة البسيطة هي تحديد مستطلع عالمي كما يلي:
<int:poller default="true" fixed-delay="100"/>
لا تنتمي إلى StackOverflow