try {
if (isMetaRequest(aMessage)) {
// Reply with metadata when retry count reaches defined threshold
if (getMetaRequestCount > 0 && getMetaRequestCount % MaxGetMetaRetryCount == 0) {
JmsMessageContext msgContext = new JmsMessageContext(aMessage, primitiveServiceQueue1);
JmsOutputChannel outputChannel = new JmsOutputChannel();
outputChannel.setServiceInputEndpoint(primitiveServiceQueue1);
outputChannel.setServerURI(getBrokerUri());
Endpoint endpoint = msgContext.getEndpoint();
outputChannel.sendReply(getPrimitiveMetadata1(PrimitiveDescriptor1), endpoint, true);
}
getMetaRequestCount++;
getMetaCountLatch.countDown(); // Count down to unblock the thread
}
} catch (Exception e) {