Code Monkey home page Code Monkey logo

mendix-kafka-module's Introduction

Mendix Kafka Module

Connect your Mendix app to Apache Kafka.

Usage

This module allows you to:

Produce data

Kafka Produce allows you to write data to a topic.

To produce data, you need to start a producer. All configuration options are available. However, the only configuration information it needs is the Kafka server to connect to and the topic to write to.

You can send a key/value pair to Kafka with the 'Send to Kafka' action.

Consume data

Kafka Consume allows you to read data from a topic.

To consume data, you need to start a consumer. All configuration options are available. However, the only configuration information it needs is the Kafka server to connect to, the topic to read from, and a microflow.

The microflow takes the following parameters:

  • offset (Long): The position of this record in the corresponding Kafka partition.
  • key (String): The key (or null if no key is specified)
  • value (String): The value

The consumer calls the microflow for each message in the topic. If you only want to start the microflow for certain messages, you can use a filtered processor

Stream data

Kafka Streams allows you to read data from one topic, and write data to another.

To stream data between two topics, you need to start a processor. All configuration options are available. However, the only configuration information it needs is the Kafka server to connect to, the topic to read from, and a microflow.

The microflow takes the following parameters:

  • offset (Long): The position of this record in the corresponding Kafka partition.
  • key (String): The key (or null if no key is specified)
  • value (String): The value

It may return one of the following:

  • List of KeyValuePair: All these messages will be sent to the output topic.
  • KeyValuePair: This message will be sent to the output topic.
  • String: A message with that value (and no key) will be sent to the output topic
  • Nothing: No messages will be sent to the output topic.

If you start a processor without an output topic, it behaves like a consumer in the sense that it only reads and does not write.

The consumer calls the microflow for each message in the input topic.

Filtering

You can filter the messages that cause the microflow to execute by starting a filtered processor. This works for JSON messages only, and only when you want to filter on a specific part of the JSON message, such as a property value.

Shut down

Make sure you call the 'Stop all Kafka connections' action before the app stops, for instance during the 'Before shutdown' microflow.

Features and limitations

Features:

  • Supports Producer, Consumer and Streams API's.
  • Allows all configuration options
  • Allows basic filtering for streams

Limitations:

  • Not (yet) integrated with the app's SSL certificates
  • More advanced filtering requires custom java

Dependencies:

  • Works with Mendix 6.10.9 and up

mendix-kafka-module's People

Contributors

joostverhoog avatar

Watchers

Pablo Máximo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.