Custom Data Publishing

WSO2 Open Banking Accelerator has enabled data publishing in API gateway and authentication components, by default. Additionally, you can publish any streams using a custom component. For example, in Dynamic Client Registration.

Let's see how you can publish data using a custom component:

publishData method

This method validates data in the map against the configuration you add and publish to WSO2 Open Banking Business Intelligence.

This method is included in the following class.

  • Publish date using the publishData(String streamName, String streamVersion, Map<String, Object> analyticsData) method in the OBDataPublisherUtil class. Given below is the method signature:

    public static void publishData(String streamName, String streamVersion, Map<String, Object> analyticsData)

  • For example, you can invoke the method as follows:

    OBDataPublisherUtil.publishData(API_LATENCY_INPUT_STREAM, API_LATENCY_STREAM_VERSION, analyticsData);


Once you add the data elements that need to be published, configure them as follows:

  1. Open <PRODUCT_HOME>/repository/conf/deployment.toml. Select the instance (Identity Server or API Manager) accordingly.
  2. Once you add the data elements that you need for data publishing, define the stream and their attributes with the priority in <IS_HOME>/repository/conf/deployment.toml using the following format:

    For example,

    • The property, required is treated as false if not explicitly mentioned.
    • The property, type is treated as string if not explicitly mentioned.

Create a custom Siddhi Application

You can create a customized Siddhi Application to publish your data using the instructions given here


You can refer to the existing Siddhi Applications in WSO2 Open Banking Business Intelligence Accelerator. They publish data for the events of API Invocation, access token, and authentication. The default Siddhi Applications are available in the <OB_BI_ACCELERATOR_HOME>/carbon-home/deployment/siddhi-files directory.