Accounting and statistics data is associated with an accounting origin.
Before you start:
To complete this task, you must have completed the following task:
When you request accounting origin support for collecting message flow accounting and statistics data on the mqsichangeflowstats command, you must also configure your message flows to provide the correct identification values that indicate what the data is associated with. You can set a different value for every message flow for which data collection is active, or the same value for a group of message flows (for example, those in a single execution group, or associated with a particular client, department, or application suite).
The accounting origin setting is not used until you deploy the message flow or flows to the brokers on which they are to run. You can activate data collection, or modify it to request accounting origin support, before or after you deploy the message flow. You do not have to stop collecting data when you deploy a message flow that changes accounting origin.
To configure a message flow to specify a particular accounting origin:
If you want to take advantage of the accounting origin support, you must include one of these nodes in each message flow for which you want a specific origin set. If you have not configured one of these three nodes in the message flow, you must add one at a suitable point (for example, immediately following the input node) and connect it to other nodes in the flow.
For further details about these nodes and how to configure them, see Compute node, Database node, or Filter node. The node topics also describe the associated ESQL module and the ESQL file in which the module exists, and the action that is taken by the node if module, file, or both do not exist.
If you do not set a value in the message flow, the default value Anonymous is used for all output. If you set a value in more than one place in the message flow, the value that you set immediately before the message flow terminates is used in the output data.
The code that you need to add is of the form:
SET Environment.Broker.Accounting.Origin = "value";
You can set the identifier to a fixed value if you choose (as shown above), or you can determine its value based on a dynamic value that is known only at runtime. For example, you might set its value to the contents of a particular field in the message that is being processed (if you are coding ESQL for a Compute node, you must use correlation name InputBody in place of Body in the following example):
IF Body.DepartmentName <> NULL THEN SET Environment.Broker.Accounting.Origin = Body.DepartmentName; END IF;
The value must be character data, and can be a maximum of 32 bytes.
Related concepts
Message flows
Message flow accounting and statistics data
Related tasks
Developing message flow applications
Deploying message flow applications
Modifying message flow accounting and statistics data collection parameters
Configuring ESQL within nodes
Related reference
mqsichangeflowstats command
Compute node
Database node
Filter node
Message flow accounting and statistics data
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
ac18935_ |