I want to monitor the queue and report the problems if any. I mean before consumer consumes the message, I want to analyze the message parameters like timestamp, message size, userID etc so that we know the cause for the problem.

903977 wrote:
I want to monitor the queue and report the problems if any. I mean before consumer consumes the message, I want to analyze the message parameters like timestamp, message size, userID etc so that we know the cause for the problem.

That is more a feature your message broker can provide, not something that should be part of the JMS specification itself. I would check the manual of whatever JMS service you are using for possibilities of monitoring, interception and logging.