Support Article

MDB listener causes exception



Sometimes when an upstream application sends the wrong format (not text message format) to MQ, then Pega throws the below exception to the log and to MQ. Due to this exception, the queue depth is increasing.

Error Messages

Message written to MQ:
Caught while processing request for service <service name>, message='Expecting a TextMessage, received a message of type:',

Error in Log:
2016-10-06 12:40:36,638 [stenerThreadPool : 1] ( services.jms.JMSListener) ERROR - Caught exception in JMS service listener <listener name> Expecting a TextMessage, received a message of type:
From: (unknown)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._invokeEngine_privact(
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(
at com.pega.pegarules.session.internal.engineinterface.etier.ejb.EngineBean.invokeEngine(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(

Steps to Reproduce

Not Applicable

Root Cause

Likely a 3rd party upstream application issue.


Here’s the explanation for the reported behavior:

Pega JMS MDB can only accept JMS message types, that is why a message of the type '' will cause the exception. Since the 'Send Error Message' is configured for the MDB listener, these exception will be sent back to MQ per the JMSReplyTo header field of the incoming message. Since the message is not even JMS compliant, it is unlikely the JMSReplyTo header is specified. The Pega logic works as expected. Suggest configure MQ retry logic on the MQ server side to discard the 'invalid' message after certain times of retry.

Published November 18, 2016 - Updated December 9, 2016

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.