Custom Codec Maven Quickstart Project

Custom Codec Maven Quickstart Project

This article will guide you through building a custom codec by using the custom codec project and using it in Kadeck. In the end, you will have a new codec option in your "Codecs" dialog in the data browser of Kadeck.
 

Introduction 

To make it easy to implement a custom code, we have created a custom codec example repository, which you can clone using your favorite git client or git command-line tools.
Note: you need to have git and maven installed to follow this article and build a custom codec.
 

Clone and build

Go to our repository and click on "clone" in the top right.
Clone our repository using the git command line in the directory of your choice:
  1. git clone https://gitlab.com/xeotekgit/kadeck-custom-codecs.git
After the last operation has completed, a new directory is created. Go to the new directory (should be "kadeck-custom-codecs") and execute the maven command with the package goal.
  1. mvn package
Maven will compile and package the custom codec and create a Java Archive (.jar) inside the project's target folder. The file name should be similar to my-codec-1.0-SNAPSHOT-jar-with-dependencies.jar. 

Place this file into an empty folder that can be accessed by Kadeck.
 

Configuring Kadeck

To make the codec available to Kadeck, we need to specify the location of the custom codec. 
Go to the settings page and enter the path to the folder, where the .jar file of the custom codec is located and click "Save". 
After connecting to a server, go to the record browser screen and select a topic. Click on the "Codec" button in the record list's main menu and select the new codec ("custom codec"). 
Instead of decoded values, you will see a history consisting of the servers that you have connected to since starting Kadeck, which might be just one entry at the moment.
When connecting to a different or the same server again in the server browser and using the custom codec again, you will see that a new entry was added. Though this might not be a useful functionality of a codec, this demo shows how to maintain and share state between custom codecs, especially when using Kadeck Teams.
 

Next steps

If you haven't done so already, please read our other articles in this section.
Also, read the comprehensive java doc of the classes and interfaces inside the com.xeotek.kadeck.codec package.
Note that you must not change the objects inside the com.xeotek.kadeck.codec package.
Delete or rename the example class com.mycompany.codec.Codec and write your own custom codec. Don't forget to change the name of the codec and the project and rename the package as well. After you are done, package your codec using maven and put the Java Archive inside your custom codecs folder.
    • Related Articles

    • Custom Codecs Introduction

      This article gives a brief introduction of custom codecs in Kadeck Desktop and Kadeck Teams and covers the essential steps to get you up and running quickly. It is recommended to read Structure of Codecs before starting developing your own codec as ...
    • Structure of custom codecs

      This article describes the structure and characteristics of codecs in Kadeck Desktop and Kadeck Teams. It is recommended to read this article carefully before developing a custom codec. The structure of codecs Codecs can be separated into two ...
    • Release 4.3

      This article describes the changes of the version 4.3.x update. New image tag: xeotek/kadeck:4.3.7 Kadeck Teams is no longer run as root as of version 4.3.5. Instead, a separate user kadeck is used. Depending on the container service, this requires ...
    • Release 5.X

      This article describes the changes of the version 5.x update. Latest image tag: xeotek/kadeck:5.2.3 Release 5.2 We’re excited to launch Kadeck 5.2, packed with major updates to our data protection policies, data catalog, and core architecture. This ...
    • Getting Started

      The Kadeck Team says: Thank you! Kadeck is the result of experienced developers, operations, architects and project managers from the IT field, who were looking for an easier and better way to implement, communicate and operate data streaming ...