npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@itentialopensource/apache-kafka-library-example

v1.0.6-2023.2.1

Published

This Pre-Built Automation bundle contains example use cases that are applicable when Itential Automation Platform is integrated with Apache Kafka using the kafka-node npm library. Because every environment is different, these use cases are fully functioni

Downloads

18

Readme

Apache - Kafka - Library - Example

Overview

This Pre-Built Automation bundle contains example use cases that are applicable when Itential Automation Platform is integrated with Apache Kafka using the kafka-node npm library. Because every environment is different, these use cases are fully functioning examples that can be easily modified to operate in your specific environment. These workflows have been written with modularity in mind to make them easy to understand and simple to modify to suit your needs.

Example Workflows

This example use case consumes Kafka messages on a given topic and triggers a job from an IAP Operations Manager Event Trigger along with passing message data to that job's context.

The Apache - Kafka - Library Pre-Built provides a modular worfklow that writes to a topic in Apache which then writes to a message queue in IAP's Event System.

In order to subscribe to the relevant event topic, one must configure the adapter-kafka service configuration's topic properties correctly.

The following topic properties is an example of setting the adapter-kafka service configuration so that the adapter subscribes to the Kafka event topic kafka-example-topic, does not filter messages based on any text, and subscribes as well to the IAP Event System topic iap-example-topic:

"topics": [
  {
    "name": "kafka-example-topic",
    "always": true,
    "subscriberInfo": [
      {
        "subname": "default",
        "filters": [],
        "rabbit": "iap-example-topic",
        "throttle": {}
      }
    ]
  }
]

Note when a new topic is set in the service configuration, a new topic is written to file in the adapter-kafka directory in the file .topics-<kafka-adapter-name>.json. If the Consume Message - Kafka - Library worfklow is not being triggered, this file may not have yet been updated with the expected topic.

On setting the adapter-kafka service configuration as shown above, navigate to the Consume Message - Kafka - Library - Example Operations Manager automation, click on the Trigger Consume Message - Kafka - Example - Trigger and select under Event the topic that was set in the adapter service configuration. The event topic based on service configuration above would be iap-example-topic - @itentialopensource/adapter-kafka.

To then produce a message to the topic set, run the modular workflow from the Apache - Kafka - Library Pre-Built Produce Message - Kafka - Library. To produce a message to the topic configured above, provide inputs such as the following:

{
  "adapterId": "kafka",
  "topic": "kafka-example-topic",
  "messages": [
    "This is a message sent to topic kafka-example-topic and will then be picked up eventually by IAP's Event System in the topic iap-example-topic"
  ],
  "suppressMessage": true
}

Upon the Send Message task completing in this workflow, there will be a job started from the workflow Consume Message - Kafka - Library of this Pre-Built that can be viewed in Operations Manager in the Jobs panel.

Note the Trigger Consume Message - Kafka - Example - Trigger defaults to the kafka - @itentialopensource/adapter-kafka event topic, which would correspond to the following adapter-kafka service configuration:

"topics": [
  {
    "name": "kafka-example-topic",
    "always": true,
    "subscriberInfo": [
      {
        "subname": "default",
        "filters": [],
        "rabbit": "kafka",
        "throttle": {}
      }
    ]
  }
]

External Dependencies

Adapters