This is an example app of how setup and use kafka.
The docker-compose provide access to the following services:
- Zookeeper: port 2181
- Kafka: port 9092
- Schema Registry: port 8081
- Kafka Rest: port 8082
// import { BaseServer, BindingCallback, RawEvent } from '../base-server'; | |
import { | |
createReadStream, createWriteStream, ConsumerStream, ProducerStream, ConsumerStreamMessage | |
} from 'node-rdkafka'; | |
import { Subject, Observable, Observer, Subscription } from 'rxjs'; | |
import { EVENTS } from '../../../experiment/events'; | |
export interface Partition { | |
observer: Subject<ConsumerStreamMessage>; |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
require 'countries' | |
require 'json' | |
ISO3166.configure do |config| | |
config.locales = [:es, :pt] | |
end | |
LOCALE = :es |
#!/bin/sh | |
# Installation | |
# | |
# wget -qO- https://gist.githubusercontent.com/jacobrpg/222b1cb3f699566bad44/raw/2e6d51c10ea9afdab489e9aba7fafe46e7c42857/ubuntu-post-install-script.sh | sh - | |
# | |
# References | |
# | |
# http://www.unixmen.com/top-things-installing-ubuntu-14-0413-1013-0412-1012-04/ | |
# http://howtoubuntu.org/things-to-do-after-installing-ubuntu-14-04-trusty-tahr |
# -*- coding: utf-8 -*- | |
from rest_framework import serializers | |
from users import models | |
class LoginSerializer(serializers.Serializer): | |
email = serializers.EmailField(max_length=254) | |
password = serializers.CharField(max_length=128) |
# -*- coding: utf-8 -*- | |
from django.utils.http import is_safe_url | |
from django.shortcuts import resolve_url | |
from django.contrib.auth import REDIRECT_FIELD_NAME, login | |
from django.contrib.auth.forms import AuthenticationForm | |
from django.utils.decorators import method_decorator | |
from django.views.decorators.cache import never_cache |