액세스를 제한해야하는 백 엔드 서비스가 있습니다. 여기에 설명 된 접근 방법을 사용하려고합니다. http://blogs.mulesoft.org/synchronous-and-asynchronous-throttling-2/백엔드 서비스에서 노새 스로틀
SOAP 요청을 수신하고 전달하는 간단한 통과를 시작했습니다. SOAPUI 유틸리티를 사용하여이 작업을 수행하면 두 번째 또는 두 번째 예상 응답을 얻습니다.
<http:connector name="httpConnector" doc:name="HTTP\HTTPS">
<receiver-threading-profile maxThreadsActive="1" maxBufferSize="100" />
</http:connector>
<jms:activemq-connector name="amqConnector" brokerURL="tcp://localhost:61616" specification="1.1" doc:name="AMQ" />
<flow name="Flow1" processingStrategy="synchronous" doc:name="Flow1">
<http:inbound-endpoint exchange-pattern="request-response"
host="localhost" port="8088" path="test" doc:name="HTTP"
mimeType="text/xml" encoding="UTF-8" connector-ref="httpConnector"/>
<http:outbound-endpoint
address="http://dnbdirect-api.dnb.com/DnBAPI-11"
exchange-pattern="request-response" doc:name="HTTP" mimeType="text/xml"/>
</flow>
그런 다음 아웃 바운드 호출을 별도의 흐름으로 이동하고 요청 - 응답 블록을 추가하면 동작이 변경됩니다. 나는 응답을 얻지 못하고 (로거에서 "큐 이후"메시지도받지 못함) 결국 SOAPUI가 시간 초과됩니다.
<http:connector name="httpConnector" doc:name="HTTP\HTTPS">
<receiver-threading-profile maxThreadsActive="1" maxBufferSize="100" />
</http:connector>
<jms:activemq-connector name="amqConnector" brokerURL="tcp://localhost:61616" specification="1.1" doc:name="AMQ" />
<flow name="Flow1" processingStrategy="synchronous" doc:name="Flow1">
<http:inbound-endpoint exchange-pattern="request-response"
host="localhost" port="8088" path="test" doc:name="HTTP"
mimeType="text/xml" encoding="UTF-8" connector-ref="httpConnector"/>
<message-properties-transformer doc:name="Message Properties">
<add-message-property key="AMQ_SCHEDULED_DELAY" value="5000"/>
</message-properties-transformer>
<logger message="Before queue" level="INFO"/>
<request-reply>
<jms:outbound-endpoint queue="request" connector-ref="amqConnector"></jms:outbound-endpoint>
<jms:inbound-endpoint queue="response" connector-ref="amqConnector"></jms:inbound-endpoint>
</request-reply>
<logger message="After queue" level="INFO"/>
</flow>
<flow name="flow2" doc:name="Flow2">
<jms:inbound-endpoint queue="request" connector-ref="amqConnector" doc:name="JMS"/>
<http:outbound-endpoint
address="http://dnbdirect-api.dnb.com/DnBAPI-11"
exchange-pattern="request-response" doc:name="HTTP" mimeType="text/xml" />
</flow>
백 엔드 서비스에 대한 호출을 끌어 오면 지연이 나타나는 것처럼 조절 동작이 작동합니다. 그러나 나는 거기서 서비스 콜을 사용할 수 없다.
무엇이 누락 되었습니까? flow2에서 HTTP 아웃 바운드 엔드 포인트 전에 다음을 추가
시도가가 http 후 로거 추가 : 당신의 flow2에서 아웃 바운드 및 페이로드 무엇인지 확인하십시오. – user1760178
나는 가지고 있고 그것이 올바른 것으로 보인다. 나는 길이 때문에이 주석에 넣을 수 없다. (나는 StackOverflow에 익숙하지 않다.) 그것을 원래의 메시지에 추가하는 것은 정상적인 일인가? – Tad