Sending Slack notifications of Kafka events - 7.1

Talend Data Stewardship User Guide

Version
7.1
Language
English (United States)
Product
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Data Stewardship
Content
Administration and Monitoring > Managing users
Data Governance > Assigning tasks
Data Governance > Managing campaigns
Data Governance > Managing data models
Data Quality and Preparation > Handling tasks
Data Quality and Preparation > Managing semantic types

To post messages about the change in task status from Kafka into Slack, you need to configure an incoming Webhook URL at Slack.

For more information about configuring Webhook URL at Slack, see https://api.slack.com/incoming-webhooks.

Procedure

  1. Go to https://<slack_room_name>.slack.com/apps/build/custom-integration.
  2. Select Incoming WebHooks.
  3. From the Post to Channel field, select a channel where to post messages from Kafka events, or create a new channel.
  4. Click Add Incoming WebHooks integration to generate a Webhook URL.
  5. Add the generated URL to the Java class.
  6. Define the message body in the java class, for example:
    messageBody = "The state of task *" + dataEvent.getResourceId() + "* has been updated from *"
                                + fieldModification.getPreviousValue() + "* to *" + fieldModification.getNewValue() + "*.";
  7. Save your changes.

Results

Whenever a task changes status to Resolved in Talend Data Stewardship, a message will be posted to the specified channel in Slack as below: