JMS Subscribe (J2EE SUBSCRIBE) Jobs intermittently hang in EXEC state
search cancel

JMS Subscribe (J2EE SUBSCRIBE) Jobs intermittently hang in EXEC state

book

Article ID: 384998

calendar_today

Updated On:

Products

Workload Automation Agent

Issue/Introduction

A JMS Subscribe Job configured to filter for specific messages is observed to hang indefinitely in the EXEC (executing) state.

Environment

CA Workload Automation Agent: v12.x

 

Cause

JMS subscribers hang in the EXEC (executing) state under certain conditions. This issue prevents the proper processing of messages published by an external application. Investigation has identified two potential root causes:

  1. Race Condition: Due to the timing of subscriber creation relative to message publication by an external application, a race condition can occur. This results in one subscriber consuming a message intended for another, leaving the second subscriber in a perpetual EXEC state without a message to process. This is especially prevalent when an external application publishes messages very rapidly after a Scheduler application initiates its subscribers.

  2. Filter Mismatch: The configured JMS message filters for the subscribers might not be correctly matching the messages published by an external application. This would also result in subscribers hanging in the EXEC state as they are waiting for messages that never arrive.

 

Resolution

To address these potential causes:

  • Addressing the Race Condition: Prevent the scenario where one subscriber "steals" a message intended for another.

  • Addressing Filter Mismatches: The JMS message filters have been thoroughly reviewed and validated to ensure they accurately match the expected message content published by an external application. This includes verifying the filter syntax, message property names, and expected values.