Skip to main content
Skip table of contents

KB 221 - Using the PowerConnect Java Agent for PI/PO Data Reconcilliation

Category: Problem

Priority: Normal

Platform: Java

Version: 1 from 27.11.2023

Introduction

The PowerConnect Java agent for SAP PI message monitoring is a powerful feature designed for real-time observability and proactive monitoring. It includes features such as retry capabilities, in-flight message tracking, and a configurable lag parameter to ensure reliable data collection and delivery to platforms like Splunk or Dynatrace.

While some customers successfully use the agent for data reconciliation (e.g., matching orders received with orders processed), it is important to note that the agent is not specifically designed for reconciliation. A key limitation stems from the SAP PI AdapterMessageMonitoring service, which imposes strict usage guidelines to protect system performance. This article outlines these limitations and provides recommendations for best practices.

What is Data Reconciliation?

Data reconciliation involves comparing datasets from multiple systems to ensure consistency and detect discrepancies. For example:

  • System A (SAP PI): Produces an "orders received" data feed.

  • System B (Downstream Processor): Produces an "orders processed" data feed.

  • Goal: Use a unique identifier (e.g., order_id) to verify that every order received has been processed.

Successful reconciliation requires comprehensive and accurate data feeds, robust tracking, and reliable systems to perform comparisons.

SAP’s Guidelines for AdapterMessageMonitoring

SAP’s AdapterMessageMonitoring web service, which the monitoring agent uses to collect data, is not intended for high-frequency or high-volume queries. According to SAP notes:

“Improper usage of the AdapterMessageMonitoring service can cause harm to the system, as it might slow down the overall message processing in the Adapter Engine and even cause memory consumption issues because of large result sets. The number of results should always be limited, and the search filter should query as specifically as possible with small time spans, particular message status values, and exact PI scenario names. The web service should not be called at high frequency (several times per minute).”

These restrictions are in place to ensure the Adapter Engine remains performant and stable, but they also introduce constraints for reconciliation workflows.

How the PowerConnect Java Agent Supports Reconciliation

The monitoring agent includes features that make it viable for certain reconciliation use cases:

  1. In-Flight Message Tracking:

    • Messages not fully processed during a collection interval are stored and re-queried in subsequent runs to update their statuses.

  2. Reliable Delivery with Retries:

    • The agent includes retry logic to minimize data loss when forwarding data to Splunk or Dynatrace.

  3. Backend Querying Capabilities:

    • Platforms like Splunk and Dynatrace can perform powerful aggregation and querying on ingested data, enabling reconciliation logic.

Why the PowerConnect Java Agent is Not Specifically Designed for Reconciliation

Despite its robust features, the agent’s reliance on the AdapterMessageMonitoring service and its design for real-time monitoring introduce the following limitations:

SAP PI Query Limits

  • MaxResults Parameter: SAP PI imposes a limit on the number of messages returned per query to prevent large result sets from impacting performance.

  • Specific Query Filters Required: Queries must use specific filters with narrow time spans, precise statuses, and scenario names to avoid overloading the system.

  • Low Polling Frequency: SAP discourages frequent polling (e.g. multiple times per minute), limiting how quickly data can be collected.

Potential for Data Loss in Downstream Systems

  • Even with retry logic, platforms like Splunk and Dynatrace can drop data due to:

    • Indexer queue overflows (Splunk).

    • Ingestion limits or network issues (Dynatrace).

Real-Time Focus

  • The agent is optimized for real-time monitoring rather than long-term historical retention or batch data comparison.

Lack of Cross-System Correlation

  • The agent does not natively compare business data from multiple systems. Custom logic is required to correlate identifiers (e.g., order_id) in the backend.

Recommendations for Using the PowerConnect Java Agent in Reconciliation Workflows

If you plan to use the agent for reconciliation, follow these best practices:

Align with SAP Guidelines

  • Query Narrow Time Windows: Limit queries to specific time spans, message statuses, and scenarios.

  • Avoid High Polling Frequency: Schedule the agent to run at intervals recommended by SAP (e.g., once every minute) to prevent system degradation.

  • Use the Max Results Parameter Wisely: Ensure the value is configured to balance result set size and performance (default is 200 per node)

Monitor Downstream Systems

  • Ensure Splunk and Dynatrace pipelines are scaled to handle peak loads without dropping data.

  • Configure alerts for ingestion failures or queue overflows

Successful Reconciliation with the Agent

Some customers have successfully used the agent for reconciliation by:

  • Configuring in-flight tracking to capture and update delayed messages.

  • Following SAP’s usage guidelines for AdapterMessageMonitoring to prevent system overload.

  • Using Splunk or Dynatrace to perform reconciliation logic on ingested data.

While these approaches can work, they depend on adherence to SAP’s recommendations and careful monitoring of downstream systems to minimize data loss.

Conclusion

The PowerConnect Java agent offers robust data collection and delivery capabilities, including retry logic and in-flight message tracking. These features enable some customers to perform reconciliation workflows effectively. However, the agent relies on SAP PI’s AdapterMessageMonitoring service, which has strict usage guidelines that limit query frequency, result set size, and time span. These constraints, combined with the potential for data loss in downstream systems, make the agent unsuitable for reconciliation at scale or as a standalone solution.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.