유닛 테스트시,이 채널로 전달되는 메시지의 양의 정확성을 확인하기 위해 대기열에있는 채널에 스프링 통합 기본 채널을 연결하려고합니다. 스프링 통합 브릿지 다이렉트 대 큐 채널
<int:filter input-channel="prevChannel" output-channel="myChannel">
<int:bridge input-channel="myChannel" output-channel="aggregateChannel">
// the reason I have above bridge is I want to check the amount of message after filter.
// I cannot check prevChannel since it is before filtering, and I cannot check aggregateChannel
// because it has other processing branch
// in test xml I import above normal workflow xml and added below configuration to
// redirect message from myChannel to checkMyChannel to checking.
<int:bridge input-channel="myChannel"
output-channel="checkMyChannel"/>
<int:channel id="checkMyChannel">
<int:queue/>
</int:channel>
나는 항상 내가 잘못했다가 STH 0
인가 반환 내 단위 테스트 하지만 checkMyChannel.getqueuesize()에 checkMyChannel를 autowire가?
편집 됨. 감사합니다. – edi
'gateway.publish()'이 무엇인지 모르므로 코드가 작동하지 않으며 왜 ''이 필요하다고 설명하지 않았기 때문에 –
와우! 'aggregateChannel'도 있습니다. 따라서 동일한 'myChannel'에 대해 두 개의' '이 있으며 기본 라운드 로빈 밸런서가있는'DirectChannel '과 유사합니다. 이제 설정이 좀 더 복잡해졌습니다. 어느 도움을 원하십니까?하지만 협조하지 않는 사람을 돕는 것은 어렵습니다 ... –