Method name (Blocking transaction processing)
Use this property to specify the external (user-defined) method that the connector calls for each input message to determine if that message represents a blocking transaction message.
Enter the name of the C method that is used to determine
whether a source queue message represents a blocking transaction.
The signature of this method is as follows:
extern "C" int methodName(void* pMessageHeader,
void* pMessageBody,
int iMessageBodyLength,
char** pszLogMessage);
- methodName
- the name of the method. This value must be specified in the Method name property.
- pMessageHeader
- pointer to the message header structure (MQMD*) for the source message. The method might consult the message header field values to determine if the message is a blocking transaction.
- pMessageBody
- pointer to the memory buffer that contains the full message body of the source queue message. This includes format headers (if any) and the message payload.
- iMessageBodyLength
- the length in bytes of the memory buffer pointed to by the pMessageBody argument.
- pszLogMessage
- Pointer to a char* buffer in which the method
stores any text message that it wants to be logged in the job log.
The text message will be logged with the Info severity. When the connector
invokes the method, the value *pszLogMessage will
be set to NULL. When the method completes, the connector will check
the value of *pszLogMessage and if it is not NULL
it will log it as an informational message and will then call:
This means that the method needs to allocate the *pszLogMessage buffer by using the malloc() method.free(*pszLogMessage);
- return value
- This integer return value has the following states:
- 0
- the message does not signify a blocking transaction
- 1
- the message signifies a blocking transaction
- Any other value
- An error occurred. The connector displays an exception and the job is aborted