Apama 10.15.0 | Connecting Apama Applications to External Components | Standard Connectivity Plug-ins | The Cumulocity IoT Transport Connectivity Plug-in | Using measurement fragments | Turning measurement fragments on/off
 
Turning measurement fragments on/off
To be able to match based on measurement fragments, you must ensure they are returned by setting the correct measurement format. There are two modes available, MEASUREMENT_ONLY and BOTH. The default, if it is not set or set incorrectly, is MEASUREMENT_ONLY. Set the mode to BOTH if you require filtering based on fragments or series.
If you are deploying a custom microservice, connecting to Cumulocity IoT from an external correlator, or using Software AG Designer, you can set the mode in the CumulocityIoT.properties file (see also Configuring the Cumulocity IoT transport) or directly on the command line to start the correlator by setting the CUMULOCITY_MEASUREMENT_FORMAT value.
The recommended approach is to set the mode from the .properties file. For example, to turn measurement fragments on:
CUMULOCITY_MEASUREMENT_FORMAT=BOTH
Alternatively, you can set the mode using the command line. For example, to turn measurement fragments off:
-DCUMULOCITY_MEASUREMENT_FORMAT=MEASUREMENT_ONLY
Note: 
As of Apama 10.5, new Apama projects in Software AG Designer have the default set to BOTH, but existing projects will retain their previous configuration. If you want to enable fragments in an existing project, you may need to remove and re-add the bundle.
When you deploy (activate) an application directly in Cumulocity IoT using the Apama EPL Apps web application, both measurements and measurement fragments are always available (this is always BOTH). See the Streaming Analytics guide at http://cumulocity.com/guides/ for more information.