Revenium Connector

Revenium provides a Mule connector that can be used in Mule applications to programmatically send metering data to the Revenium platform.

This connector is for general purpose event ingest into the Revenium platform. For API specific metering using the Revenium Metering Policy is the recommended approach for metering API transactions. Policy documentation is available here: https://docs.revenium.io/user-guide/readme/mulesoft/metering-policy-configuration

Installation

Add this dependency to your Mule application's pom.xml

<groupId>io.revenium.metering.mule</groupId>
<artifactId>revenium-metering-connector</artifactId>
<version>1.0.0</version>
<classifier>mule-plugin</classifier>

Configuration

The connector requires a configuration element to be defined in the Mule configuration file. The configuration element should contain the following attributes:

<revenium-metering:config
        name="Revenium_Metering_Config" doc:name="Revenium Metering Config"
        configId="ca-dmv-poc">
    <revenium-metering:connection
            platformUrl="https://api.revenium.io/meter/v1/api"
            apiKey="hak_api_key"/>
</revenium-metering:config>

Sending Metering Data

The connector provides a meter element that can be used to send metering data to the Revenium platform.

The meter element should contain the following attributes:

  • subscriptionId - The subscription id identifying who is consuming the data

  • sourceId - The source id of the metering data

The metering data should be provided as a JSON payload in the message payload. The key value JSON pairs will be extracted from the payload and sent to the Revenium platform as metering elements.

Metering element documentation is available here

Last updated

© Revenium - www.revenium.io