Skip to main content

Creating a Case from Kafka data

4 タスク

45 分

表示の対象:All users Applies to: Pega Platform '25
上級
英語

シナリオ

MDC plans to expand its business by partnering with other subsidiaries. To support this growth, MDC wants to enable asynchronous registrations with higher throughput and maintain loose system connectivity.

The following table provides the credentials you need to complete the challenge:

Role User name Password
Admin admin@deliveryservice rules

このチャレンジを完了するには、Pegaインスタンスを起動する必要があります。

起動には5分ほどかかることがありますので、しばらくお待ちください。

詳細なタスク

1 Identify design options

There are two options to implement the given requirement:

  • Option 1: Use the external Kafka service to read the message and create a Case asynchronously.
  • Option 2: Use a message queue to read the message and create a Case asynchronously.

2 Evaluate design options

The following table outlines the pros and cons of two design options for implementing the given requirement:

Design Pros Cons
External Kafka
  • Can handle millions of messages per second.
  • Kafka retains messages and allows for reactive programming.
  • Has high throughput and low latency.
  • Higher complexity requires an understanding of partitions, brokers, and offset management. 
  • Requires more effort to manage clusters, monitor brokers, and handle partition rebalancing.
Message queue
  • Useful as Task queues, background job processing, and simple event distribution.
  • The traditional message queue has a simpler setup and usage, making straightforward messaging tasks more intuitive. 
  • Easier to maintain with built-in tools for monitoring and management. 
  • Message queues are more lightweight buffers that store messages temporarily. 
  • Often struggles with high throughput scenarios.

3 Recommend the best design option

Kafka provides an efficient solution for MDC’s requirement for loosely coupled, asynchronous integration with high throughput.

4 Implement solution details

  1. In the Pega Platform instance for the challenge, enter the following credentials:
    1. In the User name field, enter admin@deliveryservice.
    2. In the Password field, enter rules.
  2. In the navigation pane of Dev Studio, click Configure > Decisioning > Infrastructure > Services > Stream, and then copy the IP address of the Kafka instance.
    IP address of Kafka service.
  3.  In the navigation pane of Dev Studio, click Records > SysAdmin > Create > Kafka to establish a connection with Kafka service.
  4. On the Connection tab, add host details with the IP address that you captured in step 2, and then save the Rule form.
    Kafka Connection rule.
  5. In the navigation pane of Dev Studio, click Records > Data Model > Data Set, and then create a Data Set record configuration that reads the messages from Kafka:
    1. In the Label field, enter Create Partner From Kafka.
    2. In the Type list, select Kafka.
    3. In the Context list, select Delivery Service.
    4. In the Apply to field, enter MDC-DS-Work-Partner.
    5. Click Create and open.
  6. Configure the connection details:
    1. In the Kafka configuration instance field, enter or select ConnectKafka.
    2. In the Define a Consumer Group prefix to uniquely identify the Kafka Consumer Groups filed, keep the default selected value.
    3. In the Define a new topic or select one from the cluster section, select Create new.
    4. In the Keys field, enter or select BusinessPartnerId.
    5. Click Save.
      Create partner data set rule.
  7. In the navigation pane of Dev Studio, click Records > Data Model > Data Flow, and then create a Data Flow record to read the messages from Kafka that uses the Data Set and outputs the messages to the Create Case:
    1. In the Label field, enter Create Partner Case.
    2. In the Context list, select Delivery Service.
    3. In the Apply to field, enter MDC-DS-Work-Partner.
    4. Click Create and open.
      Create partner case data flow.
  8. Click Save.
  9. Configure the source configurations for CreatePartnerCase Data Flow Rule:
    1. In the Import data from section, in the Source list, select Data set.
    2. In the Data set field, enter or select CreatePartnerFromKafka.
    3. In the Read options section, select Only read new records.
    4. Click Submit.
      Source configurations of data flow rule.
  10. Click Save.
  11. Configure the destination configurations for CreatePartnerCase Data Flow Rule:
    1. In the Output data to section, in the Destination list, select Case.
    2. In the Case list, select Partner.
    3. In the Add mapping section, in Set field, enter or select BusinessPartner, and then in the equal to field, enter or select BusinessPartner. 
    4. Click Submit, and then click Save.
      Destination configurations of data flow rule.
  12. Run the CreatePartnerCase Data Flow Rule by clicking Actions > Run, and then click Run.
Run data flow rule.
補足: In the Pega lab environment, only background nodes are available, so the Data Flow is run on a background node. In a production environment, select the node type based on the Data Flow type: use RealTime nodes for streaming (Kafka) data flows and Batch nodes for batch processing.

The system begins processing the Data Flow Run:

Running the data flow rule.


このモジュールは、下記のミッションにも含まれています。

トレーニングを実施中に問題が発生した場合は、Pega Academy Support FAQsをご確認ください。

このコンテンツは役に立ちましたか?

改善できるところはありますか?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice