SlideShare a Scribd company logo
Messaging Elixir
@kohei_kimura
@kohei_kimura
Ɠ IDC
IoT
DC
@kohei_kimura
kohei-kimura
kohei-kimura.github.io
♥ Visual Studio Code
-> ->
IDCF Cloud - One coin IaaS
Elixir
|>
|>
|> Ruby
|> mix
Messaging Elixir
Messaging Elixir
Today’s topic:
Today’s topic:
Apache Kafka
|> LinkedIn
|>
|> PubSub
|> Pull
|>
|>
|> API
|> Kafka
|> Kafka Topics UI, Kafka Connect UI
|> Landoop/fast-data-connect-cluster
|> https://fast-data-dev.demo.landoop.com/
Landoop
Messaging Elixir
Getting Started
$ git clone https://github.com/Landoop/fast-data-connect-cluster
$ cd fast-data-connect-cluster
$ sudo docker-compose up -d
KafkaEx
|> Elixir Kafka
defmodule DummyProducer.Mixfile do
#…
#Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:kafka_ex]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[{:kafka_ex, "~> 0.7.0”}]
end
end
$ mix deps.get
KafkaEx on Docker
# docker-compose.yml
version: '2'
services:
# ... #
elixir-app:
build: elixir_app
depends_on:
- kafka-stack
# Dockerfile
FROM elixir
ADD . /app
WORKDIR /app
RUN yes | mix deps.get
# config/config.exs
config :kafka_ex,
brokers: [
{"kafka-stack", 9092} # {"hostname", port}
],
consumer_group: :no_consumer_group,
use_ssl: false
How to use KafkaEx
# metadata
iex> KafkaEx.metadata
# produce
iex> KafkaEx.produce("foo", 0, “hey”)
# stream
iex> KafkaEx.stream("foo", 0, offset: 0, auto_commit: false) |> Enum.take(2)
$ docker-compose up -d elixir-app
$ docker exec -it $ID /bin/bash # $ID: elixir-app ID
# iex -S mix
|> Apache Kafka:
|> KafkaEx: Kafka
|> produce, offset, metadata
|> Landoop/fast-data-connect-cluster
|> Kafka UI docker-compose
Enjoy your Elixir programming!
Please follow me! ->

More Related Content

PDF
Elixir と Maru で REST API
PDF
REST API with Elixir with Maru
PPTX
Building Browser Extensions with Ember
PPTX
SharePoint Fest Seattle - SharePoint Framework, Angular & Azure Functions
PPTX
Flask-RESTPlusで便利なREST API開発 | Productive RESTful API development with Flask-...
PPT
Sahana Eden : Developer Environment (VM) (SahanaCamp 1.2)
PPTX
Oracle APEX & PhoneGap
PDF
Ansible, PHP and EC2
Elixir と Maru で REST API
REST API with Elixir with Maru
Building Browser Extensions with Ember
SharePoint Fest Seattle - SharePoint Framework, Angular & Azure Functions
Flask-RESTPlusで便利なREST API開発 | Productive RESTful API development with Flask-...
Sahana Eden : Developer Environment (VM) (SahanaCamp 1.2)
Oracle APEX & PhoneGap
Ansible, PHP and EC2

What's hot (20)

PDF
Don't worry be API with Slim framework and Joomla
PDF
Teaming up WordPress API with Backbone.js in Titanium
PDF
Cross-Platform Desktop Apps with Electron (Condensed Version)
PDF
Ansible Introduction
PPTX
Use case 1 - for Sitecore Automation Module
PDF
Yahoo! Query Language - Hadoop India Summit 2011
PPT
Slim3 quick start
PPTX
Sexy, Powerful, Exciting
PPTX
Rails engine
PDF
Azure web functions little bites of services
PDF
Serverless - Developers.IO 2019
PDF
Riding the Edge with Ember.js
PDF
Lambdaless and AWS CDK
PPTX
Going serverless with Azure
PDF
Large web applications development
KEY
Plone api
PPTX
Ansible training | redhat Ansible 2.5 Corporate course - GOT
PDF
Things I've learnt from my Hacker News web app
PDF
DevOps with Ansible
PDF
Cross-Platform Desktop Apps with Electron (JSConf UY)
Don't worry be API with Slim framework and Joomla
Teaming up WordPress API with Backbone.js in Titanium
Cross-Platform Desktop Apps with Electron (Condensed Version)
Ansible Introduction
Use case 1 - for Sitecore Automation Module
Yahoo! Query Language - Hadoop India Summit 2011
Slim3 quick start
Sexy, Powerful, Exciting
Rails engine
Azure web functions little bites of services
Serverless - Developers.IO 2019
Riding the Edge with Ember.js
Lambdaless and AWS CDK
Going serverless with Azure
Large web applications development
Plone api
Ansible training | redhat Ansible 2.5 Corporate course - GOT
Things I've learnt from my Hacker News web app
DevOps with Ansible
Cross-Platform Desktop Apps with Electron (JSConf UY)
Ad

Recently uploaded (20)

PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
TLE Review Electricity (Electricity).pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
1. Introduction to Computer Programming.pptx
PPTX
Tartificialntelligence_presentation.pptx
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Approach and Philosophy of On baking technology
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
Assigned Numbers - 2025 - Bluetooth® Document
SOPHOS-XG Firewall Administrator PPT.pptx
Heart disease approach using modified random forest and particle swarm optimi...
Diabetes mellitus diagnosis method based random forest with bat algorithm
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Group 1 Presentation -Planning and Decision Making .pptx
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Encapsulation_ Review paper, used for researhc scholars
Agricultural_Statistics_at_a_Glance_2022_0.pdf
TLE Review Electricity (Electricity).pptx
Advanced methodologies resolving dimensionality complications for autism neur...
1. Introduction to Computer Programming.pptx
Tartificialntelligence_presentation.pptx
Univ-Connecticut-ChatGPT-Presentaion.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Empathic Computing: Creating Shared Understanding
Approach and Philosophy of On baking technology
Mobile App Security Testing_ A Comprehensive Guide.pdf
A comparative study of natural language inference in Swahili using monolingua...
Ad

Messaging Elixir