IBM Integration Bus, Version 9.0.0.8 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

cciOutputMessageCallback

The cciOutputMessageCallback function can be registered as a callback and is called whenever a message is sent by an output node.

The cciOutputMessageCallback function is called for every output message that is sent successfully in the integration server or message flow where the callback was registered if the user exit state is active. If the node provides WrittenDestination information in the LocalEnvironment tree, the callback is called after this information is created.

A callback is made after the following operations are completed:
  • Sending a message from an output or reply node (for WebSphere® MQ, JMS, TCPIP, HTTP, or SOAP nodes).
    Note: If you use a destination list with WebSphere MQ or JMS nodes, a single callback is made after the message is sent to the last destination in the list. The node provides details of the message sent to each destination in the WrittenDestination information in the LocalEnvironment tree.
  • Sending a message from a request node (TCPIP, HTTP, or SOAP nodes). The callback is made after the reply has been received.
  • Writing to a file (FileOutput node).
  • Sending an email (EmailOutput node).
  • Completing an adapter request (WebSphere Adapters request nodes).

The callback is registered by providing a pointer to the function as the iFpOutputMessageCallback field of the CCI_UE_VFT struct that is passed to cciRegisterUserExit. The iFpOutputMessageCallback field was added in CCI_UE_VFT struct version 2.

When you implement this callback, check the node type by using cciGetNodeType before you perform any node-specific operations.

Syntax

typedef void (*cciOutputMessageCallback)     ( 
                                 CciDataContext*  userContext,
                                 CciMessage*      message,
                                 CciMessage*      localEnvironment,
                                 CciMessage*      exceptionList,
                                 CciMessage*      environment,
                                 CciNode*         node);

Parameters

userContext (input)
The value that is passed to the cciRegisterUserExit function.
message (input)
A handle to the message object. You must not update the transport headers or Properties elements in this tree.

You can update the message body. However, because this callback is called after the message has been sent to the transport, any changes do not appear in that message. Changes are visible only to nodes that are connected downstream of the output node. Updating the message can affect performance, particularly if the message tree would not otherwise be changed in the message flow.

localEnvironment (input)
A handle to the local environment object. The handle can contain information about the destination of the message that is written in the WrittenDestination subtree. See each node's documentation for more details.
exceptionList (input)
A handle to the exception list object.
environment (input)
A handle to the environment object for the current message flow.
node (input)
A handle to the node that has sent the output message. You can use the handle to make calls to functions such as cciGetNodeName, cciGetNodeType, and cniGetBrokerInfo.

Return values

None.

Example

void myOutputMessageCallback(
                      CciDataContext*  userContext,
                      CciMessage*      message,
                      CciMessage*      localEnvironment,
                      CciMessage*      exceptionList,
                      CciMessage*      environment,
                      CciNode*         node){
}

as35965_.htm | Last updated Friday, 21 July 2017