MessageLogging policy not triggered in post client flow when default fault rule is executed

Hi Apigeeks,

I have configured the MessageLogging policy in post client flow to write to file.

When we get a fault in the proxy we handle it with default fault rules mechanism and send the error message to client. What we are not able to figure out is why the MessageLogging policy is not triggered for such cases.

Also I am getting error logged in MP logs

2017-08-16 13:11:20,475 org:enbd env:sit-inbound api:msglogging rev:1 messageid:lvmopapidmz1d-6394-1785697-3 policy:MessageLogging Apigee-Main-1 ERROR FILE_LOGGER - BufferedWriter.bufferMessage() : Failed to write to the buffer 02017-08-16 13:12:13,540 org:enbd env:sit-inbound api:msglogging rev:1 messageid:lvmopapidmz1d-6394-1785814-1 policy:MessageLogging Apigee-Main-5 ERROR FILE_LOGGER - BufferedWriter.bufferMessage() : Failed to write to the buffer 0
	

Don't understand why this MP is behaving this way?

Any help?

Solved Solved
0 2 588
1 ACCEPTED SOLUTION

Hi @Mohammad Ateeb Shaik,

Figured this out, this is a bug in MessageLogging policy.

This question gives complete scenario and steps to reproduce the same issue. Well, the MessageLogging policy does get invoked, but in the trace, we will not see this being completed as MP is stuck on the same execution thread in WAITING/TIMED_WAITING state.

Hope this will help others as well!

View solution in original post

2 REPLIES 2

ateebshaik
Participant III

Hi @Mohammed Zuber

I tried replicating the same scenario and was able to log the message in the post client flow.

Attached is the image for the transaction flow where we tried to raise a raise fault .

Are you checking for any specific conditions

5562-transaction.png

Hi @Mohammad Ateeb Shaik,

Figured this out, this is a bug in MessageLogging policy.

This question gives complete scenario and steps to reproduce the same issue. Well, the MessageLogging policy does get invoked, but in the trace, we will not see this being completed as MP is stuck on the same execution thread in WAITING/TIMED_WAITING state.

Hope this will help others as well!