Sun Java System Messaging Server 6 2005Q4 MTA Developer's Reference

mtaDequeueThreadId()

Return the thread ID associated with the specified dequeue context.

Syntax

int mtaDequeueThreadId(mta_dq_t *dq_ctx);

Arguments

Arguments  

Description  

dq_ctx

A dequeue context created by mtaDequeueStart().

Description

Each processing thread is assigned a unique integer identifier referred to as a thread ID. This thread ID is intended as a diagnostic aid when debugging channel programs. Showing it with diagnostic messages helps to differentiate the work of one thread from another in the channel’s debug log file.

The thread ID can also be obtained with mtaDequeueInfo().

Return Values

In the event of an error, the value -1 is returned and mta_errno is set to indicate the error status code.

Error Status Code  

Description  

MTA_BADARGS

A NULL value was supplied for the dq_ctx call argument, or an invalid dequeue context was supplied for dq_ctx.

Example


mtaLog("%08d: process_message() called with dq_ctx=%p",
       mtaDequeueThreadId(dq_ctx), dq_ctx);