Skip to content

Commit

Permalink
Merge pull request wso2#2089 from malakaganga/fix_passthrough_rem_dis…
Browse files Browse the repository at this point in the history
…card_master

Add the fix in synapse PR 1484 again which is reverted by PR 1719
  • Loading branch information
malakaganga authored May 12, 2023
2 parents 97abb92 + a2d53d7 commit b7aa5dd
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ public void receive(MessageContext messageCtx) throws AxisFault {
}

if (callback != null) {
messageCtx.removeProperty(PassThroughConstants.INTERNAL_EXCEPTION_ORIGIN);
org.apache.synapse.MessageContext SynapseOutMsgCtx = callback.getSynapseOutMsgCtx();
ConcurrencyThrottlingUtils.decrementConcurrencyThrottleAccessController(SynapseOutMsgCtx);
boolean isMarkedForRemoval = false;
Expand All @@ -207,7 +206,7 @@ public void receive(MessageContext messageCtx) throws AxisFault {
handleNoCallback(messageID, messageCtx);
return;
}

messageCtx.removeProperty(PassThroughConstants.INTERNAL_EXCEPTION_ORIGIN);
if (RuntimeStatisticCollector.isStatisticsEnabled()) {
CallbackStatisticCollector.updateParentsForCallback(SynapseOutMsgCtx, messageID);
handleMessage(messageID, messageCtx, SynapseOutMsgCtx, (AsyncCallback) callback);
Expand Down Expand Up @@ -791,9 +790,12 @@ private void popFailOverEPFromFaultStack(org.apache.synapse.MessageContext synCt
* @param messageCtx messageContext
*/
private void handleNoCallback(String messageID, MessageContext messageCtx){
log.warn("Synapse received a response for the request with message Id : " +
messageID + " and correlation_id : " + messageCtx.getProperty(CorrelationConstants
.CORRELATION_ID) + " But a callback is not registered (anymore) to process this response");
if (!PassThroughConstants.INTERNAL_ORIGIN_ERROR_HANDLER
.equals(messageCtx.getProperty(PassThroughConstants.INTERNAL_EXCEPTION_ORIGIN))) {
log.warn("Synapse received a response for the request with message Id : " +
messageID + " and correlation_id : " + messageCtx.getProperty(CorrelationConstants
.CORRELATION_ID) + " But a callback is not registered (anymore) to process this response");
}
}

/**
Expand Down

0 comments on commit b7aa5dd

Please sign in to comment.