DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • Integrate Oracle Database With Apache Kafka Using Debezium
  • Enabling Business Transaction Monitoring for App Connect Enterprise
  • Applying Kappa Architecture to Make Data Available Where It Matters
  • Integration Patterns in Microservices World

Trending

  • Advancing Robot Vision and Control
  • A Guide to Auto-Tagging and Lineage Tracking With OpenMetadata
  • The Future of Java and AI: Coding in 2025
  • Navigating and Modernizing Legacy Codebases: A Developer's Guide to AI-Assisted Code Understanding
  1. DZone
  2. Data Engineering
  3. Big Data
  4. Low Code Serverless Integration With Kafka

Low Code Serverless Integration With Kafka

In this article, we will build out a scenario of publishing messages from AWS Lambda to a Kafka topic.

By 
Pranav K user avatar
Pranav K
DZone Core CORE ·
Updated Aug. 12, 20 · Tutorial
Likes (4)
Comment
Save
Tweet
Share
6.5K Views

Join the DZone community and get the full member experience.

Join For Free

Kafka is a popular choice when huge volumes of real-time data streaming is a requirement. Simply, Kafka allows you to send messages between different components / applications in a distributed environment, facilitating an event-driven architecture.

Serverless compute is increasingly being preferred as the solution of choice for running application code on the cloud.

In this article, we will build out a scenario of publishing messages from AWS Lambda to a Kafka topic. Consider a stock brokerage, where publishing real-time updates to stock prices (called a stock ticker) is one of the core requirements. Given the volume of such messages to be published in sub-second duration, Kafka becomes a natural fit.

Use Case

Business scenario for the use case is depicted below.

kumologica

  1. Stock price update service keeps updating DynamoDB table with changes to the price of a stock.
  2. The DynamoDB table has streams enabled into which the stock symbols of the stocks whose price got updated are published.
  3. Stock ticker service listens for the stock symbol, and looks up details like:
  • Stock name
  • Current price
  • Last traded price
  • Percentage change in price

and publishes it as a message to a Kafka topic.

4. The Kafka topic is consumed downstream and acted upon accordingly.

In this article we will build the Stock ticker service that listens to DynamoDB streams and publishes appropriate messages to Kafka streams.

Prerequisite

  1. Kumologica designer installed in your machine. https://kumologica.com/download.html
  2. Access to a Kafka broker end-point. For this implementation, we ran a Docker image of Apache Kafka locally.
  3. A DynamoDB table with a structure as below:

ticketsymbol

Implementation

Kumologica flow for this use case will use the process logic as outlined below:

kafka

The implemented flow looks like this:

ticket updates

This flow is available in GIT at: Stock Ticker Service Flow

To import this flow into Kumologica designer, follow the steps below:

  1. Open Kumologica Designer, click the Home button and choose Create New Kumologica Project.
  2. Enter name (for example: KafkaFlow), select directory for project and switch Source into From Existing Flow …
  3. Copy and paste the flow json content that you downloaded from GIT.
  4. Press Create Button.
  5. The designer palette will show the flow.

Once the import is done, configure as below:

  1. If you have not already installed the Kafka node, do so by clicking on the “Add more nodes” button in the Kumologica editor, and install the Kafka node.
  2. Ensure that you update the following nodes:
  • DynamoDB: update the table ARN
  • Kafka: Kafka topic name and Kafka broker name

to reflect the environment that you are working with.

Testing

Kumologica Editor Integrated Tester

The flow can be tested from within the Kumologica editor using the TEST tab. A test case with the name “Ticker Update Event” is already available in the imported flow. Submit the test case and check that the message is published to the configured Kafka topic.

ticket update event

Deploy Flow to AWS Lambda

  1. Choose the CLOUD tab on the right side pane.
  2. Select the AWS profile that has required permissions to deploy Lambda.
  3. Under TRIGGERS section, select “Amazon DynamoDB” from the available options. For “Stream ARN”, provide the ARN of the DynamoDB stream.
  4. Click the DEPLOY button, and this triggers the build and deployment of the flow to AWS. The progress of the deployment can be tracked from the console.

Amazon DynamoDB

For testing, make some changes to the records in the DynamoDB table, and verify that the corresponding message is getting published to the Kafka topic.

Conclusion

This is a simple demonstration of the capabilities of Kumologica that enabled us to develop a complex use case with simple configuration of nodes. All the intricacies of the integration is taken care by Kumologica. Within few minutes we have created and deployed the Stock Ticker Service Kumologica flow.

Kumologica is totally free to download and use. Go ahead and give it a try, we would love to hear your feedback.

In the meantime, if there is a specific use case that you would like to see in a future article, please let us know in the comments section.

kafka Use case Integration Flow (web browser) code style Database

Opinions expressed by DZone contributors are their own.

Related

  • Integrate Oracle Database With Apache Kafka Using Debezium
  • Enabling Business Transaction Monitoring for App Connect Enterprise
  • Applying Kappa Architecture to Make Data Available Where It Matters
  • Integration Patterns in Microservices World

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!