All Projects → streamnative → pulsar-flume-ng-sink

streamnative / pulsar-flume-ng-sink

Licence: Apache-2.0 license
An Apache Flume Sink implementation to publish data to Apache pulsar

Programming Languages

java
68154 projects - #9 most used programming language
python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to pulsar-flume-ng-sink

aop
AMQP on Pulsar protocol handler
Stars: ✭ 93 (+389.47%)
Mutual labels:  messaging, pubsub, apache-pulsar
tgip
TGIP (TGI Pulsar) is a weekly live video streaming about Apache Pulsar and its ecosystem.
Stars: ✭ 17 (-10.53%)
Mutual labels:  messaging, pubsub, apache-pulsar
pulsar-tracing
Tracing instrumentation for Apache Pulsar clients.
Stars: ✭ 13 (-31.58%)
Mutual labels:  messaging, pubsub, apache-pulsar
Pulsar Client Go
Apache Pulsar Go Client Library
Stars: ✭ 251 (+1221.05%)
Mutual labels:  messaging, pubsub
Ejabberd
Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
Stars: ✭ 5,077 (+26621.05%)
Mutual labels:  messaging, pubsub
Centrifugo
Scalable real-time messaging server in a language-agnostic way. Set up once and forever.
Stars: ✭ 5,649 (+29631.58%)
Mutual labels:  messaging, pubsub
Msngr.js
An asynchronous messaging library, written in JavaScript, for node and the web browser
Stars: ✭ 337 (+1673.68%)
Mutual labels:  messaging, pubsub
Libzmq
ZeroMQ core engine in C++, implements ZMTP/3.1
Stars: ✭ 7,418 (+38942.11%)
Mutual labels:  messaging, pubsub
Hermes
Fast and reliable message broker built on top of Kafka.
Stars: ✭ 665 (+3400%)
Mutual labels:  messaging, pubsub
Pulsar Manager
Apache Pulsar Manager
Stars: ✭ 247 (+1200%)
Mutual labels:  messaging, pubsub
Beaver
💨 A real time messaging system to build a scalable in-app notifications, multiplayer games, chat apps in web and mobile apps.
Stars: ✭ 1,056 (+5457.89%)
Mutual labels:  messaging, pubsub
Vernemq
A distributed MQTT message broker based on Erlang/OTP. Built for high quality & Industrial use cases.
Stars: ✭ 2,628 (+13731.58%)
Mutual labels:  messaging, pubsub
Centrifuge
Real-time messaging library for Go with scalability in mind
Stars: ✭ 446 (+2247.37%)
Mutual labels:  messaging, pubsub
Hivemq Community Edition
HiveMQ CE is a Java-based open source MQTT broker that fully supports MQTT 3.x and MQTT 5. It is the foundation of the HiveMQ Enterprise Connectivity and Messaging Platform
Stars: ✭ 562 (+2857.89%)
Mutual labels:  messaging, pubsub
Nats.net
The official C# Client for NATS
Stars: ✭ 378 (+1889.47%)
Mutual labels:  messaging, pubsub
Nats.rb
Ruby client for NATS, the cloud native messaging system.
Stars: ✭ 850 (+4373.68%)
Mutual labels:  messaging, pubsub
Emqx
An Open-Source, Cloud-Native, Distributed MQTT Message Broker for IoT.
Stars: ✭ 8,951 (+47010.53%)
Mutual labels:  messaging, pubsub
Pulsar Dotpulsar
The official .NET client library for Apache Pulsar
Stars: ✭ 101 (+431.58%)
Mutual labels:  messaging, pubsub
Tigase Server
Highly optimized, extremely modular and very flexible XMPP/Jabber server
Stars: ✭ 170 (+794.74%)
Mutual labels:  messaging, pubsub
pulsar-client-node
Apache Pulsar NodeJS Client
Stars: ✭ 88 (+363.16%)
Mutual labels:  messaging, pubsub

Flume Ng Pulsar Sink

License Build Status

This is a Flume Sink implementation that can publish data to a Pulsar topic

Compatibility

This sink is developed and tested using Apache Flume NG 1.9.0 and Apache Pulsar Client 2.3.0.

Requirements

Clone the project

$ git clone https://github.com/streamnative/flume-ng-pulsar-sink.git

Start Pulsar Standalone

docker pull apachepulsar/pulsar:2.3.0
docker run -d -it -p 6650:6650 -p 8080:8080 -v $PWD/data:/pulsar/data --name pulsar-flume-standalone apachepulsar/pulsar:2.3.0 bin/pulsar standalone

Start Pulsar Consumer

Start a consumer to consume messages from topic flume-test-topic.

docker cp src/test/python/pulsar-flume.py pulsar-flume-standalone:/pulsar
docker exec -it pulsar-flume-standalone /bin/bash
python pulsar-flume.py

Setup up Flume

Prepare Build Environment

Open a new terminal to start a docker instance flume of maven:3.6-jdk-8 in the same network as pulsar-flume-standalone we started at previous step. We will use this flume docker instace to install Flume and Flume-Ng-Pulsar-Sink.

docker pull maven:3.6-jdk-8
docker run -d -it --link pulsar-flume-standalone -p 44445:44445 --name flume maven:3.6-jdk-8 /bin/bash

Install Flume

Go to the docker instance flume

docker exec -it flume /bin/bash

At flume instance:

wget http://apache.01link.hk/flume/1.9.0/apache-flume-1.9.0-bin.tar.gz
tar -zxvf apache-flume-1.9.0-bin.tar.gz

Install Pulsar Sink

At flume instance:

git clone https://github.com/streamnative/flume-ng-pulsar-sink
cd flume-ng-pulsar-sink
mvn clean package
cd ..
cp flume-ng-pulsar-sink/target/flume-ng-pulsar-sink-1.9.0.jar apache-flume-1.9.0-bin/lib/
exit

Configure Flume

Copy the example configurations to flume:

docker cp src/test/resources/flume-example.conf flume:/apache-flume-1.9.0-bin/conf/
docker cp src/test/resources/flume-env.sh flume:/apache-flume-1.9.0-bin/conf/

Start Flume Ng Agent

docker exec -it flume /bin/bash

At flume instance:

apache-flume-1.9.0-bin/bin/flume-ng agent --conf apache-flume-1.9.0-bin/conf/ -f apache-flume-1.9.0-bin/conf/flume-example.conf -n a1

Send Data

Open another terminal, send data to port 44445 of flume

➜  ~ telnet localhost 44445
Trying ::1...
Connected to localhost.
Escape character is '^]'.
hello
OK
world
OK

At the terminal running pulsar-consumer.py, you will see following output:

'eceived message: 'hello
'eceived message: 'world

Cleanup

flume and pulsar-flume-standalone are running at background. Please remember to kill them at the end of this tutorial.

$ docker ps | grep pulsar-flume-standalone | awk '{ print $1 }' | xargs docker kill
$ docker ps | grep flume | awk '{ print $1 }' | xargs docker kill

Installation

Requirements

  • JDK 1.8+
  • Apache Maven 3.x

Build from Source

Clone the project from Github:

$ git clone https://github.com/streamnative/flume-ng-pulsar-sink.git

Building the Flume Ng Sink using maven:

$ cd flume-ng-pulsar-sink
$ mvn clean package

Once it is built successfully, you will find a jar flume-ng-pulsar-sink-<version>.jar generated under target directory. You can drop the built jar at your flume installation under lib directory.

Usage

Configurations

Name Description Default
useAvroEventFormat Whether use avro format for event false
syncMode Mode of send data to pulsar true

Client

Name Description Default
serviceUrl Whether non-persistent topics are enabled on the broker localhost:6650
authPluginClassName name of the Authentication-Plugin you want to use ""
authParamsString string which represents parameters for the Authentication-Plugin, e.g., "key1:val1,key2:val2" ""
tlsCertFile path of tls cert file ""
tlsKeyFile path of tls key file ""
useTLS Whether to turn on TLS, if to start, use protocol pulsar+ssl false
operationTimeout Set the operation timeout (default: 30 seconds) 30s
numIoThreads Set the number of threads to be used for handling connections to brokers 1
numListenerThreads Set the number of threads to be used for message listeners 1
connectionsPerBroker Sets the max number of connection that the client library will open to a single broker. 1
enableTcpNoDelay Configure whether to use TCP no-delay flag on the connection, to disable Nagle algorithm. false
tlsTrustCertsFilePath Set the path to the trusted TLS certificate file false
allowTlsInsecureConnection Configure whether the Pulsar client accept untrusted TLS certificate from broker false
enableTlsHostnameVerification whether to enable TLS hostname verification false
statsInterval the interval between each stat info 60
maxConcurrentLookupRequests Number of concurrent lookup-requests allowed to send on each broker-connection to prevent overload on broker. 60
maxLookupRequests Number of max lookup-requests allowed on each broker-connection to prevent overload on broker. 60
maxNumberOfRejectedRequestPerConnection Set max number of broker-rejected requests in a certain time-frame (30 seconds) after which current connection will be closed and client creates a new connection that give chance to connect a different broker 50
keepAliveIntervalSeconds Set keep alive interval in seconds for each client-broker-connection. 30
connectionTimeout Set the duration of time to wait for a connection to a broker to be established. 30

Producer

Name Description Default
topicName Specify the topic this producer will be publishing on. ""
producerName Specify a name for the producer ""
sendTimeout Set the send timeout 30s
blockIfQueueFull Set whether the send and sendAsync operations should block when the outgoing message queue is full. false
enableBatching Control whether automatic batching of messages is enabled for the producer true
batchMessagesMaxMessagesPerBatch maximum number of messages in a batch 1000
batchDelay the batch delay 1ms
messageRoutingMode the message routing mode, SinglePartition,RoundRobinPartition, CustomPartition(0,1,2) 1
hashingSchema JavaStringHash,Murmur3_32Hash(0,1) 0
compressionType NONE,LZ4,ZLIB,ZSTD(0,1,2,3) 0

License

This project is licensed under the Apache License 2.0.

FOSSA Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].