Dead Letter Queue

When a JMS message reaches the maximum retry defined; it is sent to a dead queue configured with the respective route. In case of time dependencies if time dependency is not executed within the predefined retry count it is saved into database and will not be picked by Orchestrator. This can be still triggered from JConsole using JMX interface.

Following are the cases when the dead letter queue is used:

  1. JMS Event fails after max retries: JMS messages are routed to Dead letter Queue in JMS. This can be viewed using JMS Clients. The user can replay it by moving the dead letter queue messages back to source queue events or by using JMX operations provided to move them to source queue.
  2. Timer Events for Time dependent plan items fails after max retries: Time Events that fail after the max number of retries will be moved to dead letter table in database.
  3. Batching Errors: If the batching is configured, database Notifications are batched and executed and committed in batch. If the transaction fails, each notification from the batch is executed separately and committed in the database. If it still fails, order id that is related to the notification is marked as batch error and notification is moved to dead letter table in database. Any other notifications for the same order are moved to the dead letter table. User can execute them manually using JMX console.
  4. Database table structure for dead letter queue:
    DEAD_LETTER table
    Column Description
    SID ID
    DEADLETTERID Dead Letter ID (Any reference based on the dead letter type) For Time dependency and Batch, its order id.
    DEADLETTERTYPE Allowed Values are TIME_DEPENDENCY and BATCH.
    VALUE Data blob.
    LASTSTATUSCHANGE Timestamp when record was last updated.
  5. Any JMS events on those orders before manually executing these requests are moved to JMS dead letter queue.
  6. Any Timer events on those orders before manually executing these requests are moved to DB dead letter queue.
  7. Following JMX operations are exposed to the user for viewing and executing the dead letter queue.
    Operation Arguments Expected Results
    getDLQDB A string value indicates dead letter type. Allowed value is Tenantid. It can be an empty string. Displays list of all dead letters according to the input parameter. If input is empty string; it will list out all the dead letters including batch errors and time events.
    getDLQJMS A string value indicates dead queue name or it can be an empty string. Allowed values: queueName and tenantid. Displays list of messages pending on respective dead queue provided as input. If input is empty string; it will list out all the pending messages on all Orchestrator related dead queues.
    runDLQBatchErrors A string value indicates orderID or it can be an empty string. Allowed values: orderid and tenantid. Executes further processing of respective orderID. If input is an empty string, it will process all orderIDs available in dead letter.
    runOrchJMSDLQ A string value indicates dead queue name or it can be an empty string. Allowed values: queuename, nodeid and tenantid. Processes all messages pending on respective dead queue. If input is an empty string, it will process messages pending on all dead queues.
    getOrchStatus The node ID that you want the status for. Returns the status for a given node ID indicating if the node is in INIT or STARTED state.
    moveJMSMessages

    sourceQueue - The queue from which messages need to be moved.

    targetQueue - The target queue where they will be copied.

    sourceOriginator - Filters messages from sourceQueue based on originator value.

    targetOriginator - Indicates the new value of originator header for the messages that are moved.

    tenantId - Indicates the tenant whose messages need to be moved.

    Moves messages from a source to a target queue and also changes the value of the originator header if indicated by the caller.
The following dead queues are supported by JMX operations to move back the messages to its source destination:
Dead Queue Name Description
tibco.aff.orchestrator.order.submit.dead Submit Order Request dead queue
tibco.aff.orchestrator.planItem.execute.reply.dead PlanItem execution response dead queue
tibco.aff.orchestrator.planItem.milestone.notify.request.dead MilestoneNotifyRequest from process components to Orchestrator dead queue
tibco.aff.orchestrator.order.withdraw.dead Withdraw Order dead queue
tibco.aff.orchestrator.order.activate.dead Activate order request dead queue
tibco.aff.orchestrator.planItem.suspend.reply.dead PlanItem suspend response dead queue
tibco.aff.orchestrator.order.suspend.dead Suspend order request dead queue
tibco.aff.orchestrator.cache.cleanup.dead Cache cleanup dead queue
tibco.aff.orchestrator.provider.order.feasibility.reply.dead External Feasibility reply dead queue
tibco.aff.orchestrator.provider.order.prequal.failed.reply.dead External PreQualificationFailed reply dead queue
tibco.aff.orchestrator.provider.planItem.failed.reply.dead PlanItem error handler response dead queue
tibco.aff.orchestrator.planItem.externalDependency PlanItem External Dependency Release
release.request.dead Request dead queue
tibco.aff.orchestrator.cache.addEvent.dead Time dependency add event dead queue
com.tibco.fom.oms.afi.orch.opdresponse.sender.dead.queue OPDResponse to Orchestrator dead queue
com.tibco.af.oms.orderService.amendment.task.ack.dead.queue Order amendment acknowledgment task dead queue