zeromq

Kafka及周边深度了解

寵の児 提交于 2019-12-08 17:11:36
本文属于原创,转载注明出处,欢迎关注微信小程序 小白AI博客 微信公众号 小白AI 或者网站 https://xiaobaiai.net 或者我的CSDN http://blog.csdn.net/freeape [TOC] 0 前言 文章有点长,但是写的都挺直白的,慢慢看下来还是比较容易看懂,从Kafka的大体简介到Kafka的周边产品比较,再到Kafka与Zookeeper的关系,进一步理解Kafka的特性,包括Kafka的分区和副本以及消费组的特点及应用场景简介。 1 简介 Apache Kafka 是一个 分布式流处理平台 ,注意是平台: 发布 & 订阅,类似消息系统,并发能力强,通过集群可以实现数据总线作用,轻轻松松实现流式记录数据分布式读写 以高容错的方式存储海量流式数据 可以在流式记录数据产生时就进行处理 从上面的一个Kafka小型应用架构图可以了解Kafka周边及它的实际能扮演的角色,图中Kafka集群连接了六个数据输入输出部分,分别是 Kafka Producer 、 Kafka Connect Source 、 Kafka Streams/KSQL 、 Kafka Consumer 、 Kafka Connect Sink 。而这些数据的输入输出都可以通过Kafka提供的四个核心API组去解决(除 Kafka AdminClient API 外): Kafka

How to use ZeroMQ for raw UDP?

被刻印的时光 ゝ 提交于 2019-12-08 15:59:19
问题 I have a client, whose code I can't change -- but I'd like to (re)write using ZeroMQ sockets. The clients use both raw TCP and raw UDP sockets. I know I can use ZMQ_ROUTER_RAW for raw TCP sockets, but what about for raw UDP datastreams? 回答1: Support for UDP in ZeroMQ is brand new. The documentation for the new socket types (Radio/Dish) was just pushed to the GitHub repository a few days ago. As of right now, though, it still looks like there's no raw UDP support, but perhaps it will stem out

Unable to load dynamic library php_zmq.dll - The specified module could not be found

心已入冬 提交于 2019-12-08 13:28:33
I have XAMPP with PHP Version PHP 7.1.13 (cli) (built: Jan 3 2018 20:16:04) ( ZTS MSVC14 (Visual C++ 2015) x86 ) . I want to install the ZeroMQ extension, which I downloaded from here http://pecl.php.net/package/zmq/1.1.3/windows specifically 7.1 Thread Safe (TS) x86 moved the php_zmq.dll to the file C:\xampp\php\ext , and wrote extension=php_zmq.dll into the file C:\xampp\php\php.ini , wrote C:\xampp\php\ext in to Windows PATH , but I still getting this error : PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_zmq.dll' - The specified module could not be found. in

PUB/SUB+PUSH/PULL Messaging Broker - How to improve latency and performance?

末鹿安然 提交于 2019-12-08 12:25:31
问题 I have implemented this ZMQ Client-Server architecture with the order to one message from Sender client, this message arrives at other clients Receiver 1, Receiver 2 and Receiver 3. This means that the all receivers can see the same data from Sender In this architecture, I have python clients and c++ clients. The server is coded with Python using pyzmq binding. The question is: Why on my python clients the message appears faster than on my c++ clients? Is this related to the fact that the

zeromq: TypeError: string indices must be integers, not str

落花浮王杯 提交于 2019-12-08 11:25:46
问题 I want to establish publish subscribe communication between to machines. The two machines, that I have, are ryu-primary and ryu-secondary The steps I follow in each of the machines are as follows. In the initializer for ryu-primary (IP address is 192.168.241.131) self.context = zmq.Context() self.sub_socket = self.context.socket(zmq.SUB) self.pub_socket = self.context.socket(zmq.PUB) self.pub_port = 5566 self.sub_port = 5566 def establish_zmq_connection(self): # Socket to talk to server print

ZeroMQ Subscribers not receiving message from Publisher over an inproc: transport class

偶尔善良 提交于 2019-12-08 09:19:46
问题 I am fairly new to pyzmq . I am trying to understand inproc: transport class and have created this sample example to play with. It looks a Publisher instance is publishing messages but Subscriber instances are not receiving any. In case I move Subscriber instances into a separate process and change inproc: to a tcp: transport class, the example works. Here is the code: import threading import time import zmq context = zmq.Context.instance() address = 'inproc://test' class Publisher(threading

ZeroMQ N to N async pattern in Python

 ̄綄美尐妖づ 提交于 2019-12-08 08:01:30
问题 N-proxy-N Pub-Sub Similar to the question N to N async pattern in ZeroMQ?, but which unfortunately never received an answer with working code. I'm trying to implement Pub-Sub network as described in the guide: http://zguide.zeromq.org/py:all#The-Dynamic-Discovery-Problem (a small message broker in the style of N-proxy-N). Unfortunately, the guide doesn't provide any code examples. I've tried to implement an Hello World example using PyZMQ, I think I'm close, but I'm facing some errors I don't

Unable to load dynamic library php_zmq.dll - The specified module could not be found

ぐ巨炮叔叔 提交于 2019-12-08 07:07:42
问题 I have XAMPP with PHP Version PHP 7.1.13 (cli) (built: Jan 3 2018 20:16:04) ( ZTS MSVC14 (Visual C++ 2015) x86 ) . I want to install the ZeroMQ extension, which I downloaded from here http://pecl.php.net/package/zmq/1.1.3/windows specifically 7.1 Thread Safe (TS) x86 moved the php_zmq.dll to the file C:\xampp\php\ext , and wrote extension=php_zmq.dll into the file C:\xampp\php\php.ini , wrote C:\xampp\php\ext in to Windows PATH , but I still getting this error : PHP Warning: PHP Startup:

0mq: pubsub latency continually growing with messages?

早过忘川 提交于 2019-12-08 06:09:01
问题 pub.py import zmq import random import sys import time port = "5556" if len(sys.argv) > 1: port = sys.argv[1] int(port) context = zmq.Context() socket = context.socket(zmq.PUB) socket.bind("tcp://*:%s" % port) topic = 10001 while True: msgdata = time.time() socket.send("%d %d" % (topic, msgdata)) print "topic:%d, msg:%.5f" % (topic, msgdata) time.sleep(1) sub.py import sys import zmq import time port = "5556" if len(sys.argv) > 1: port = sys.argv[1] int(port) if len(sys.argv) > 2: port1 = sys

'node-gyp' error in installing npm packages

怎甘沉沦 提交于 2019-12-08 05:26:28
问题 I am getting this error when I am trying to install "zmq" through npm oem@saurabh:~/Desktop/watcher/messaging$ npm install zmq > zmq@2.15.3 install /home/oem/Desktop/watcher/messaging/node_modules/zmq > node-gyp rebuild make: Entering directory '/home/oem/Desktop/watcher/messaging/node_modules/zmq/build' CXX(target) Release/obj.target/zmq/binding.o ../binding.cc:28:10: fatal error: zmq.h: No such file or directory #include <zmq.h> ^~~~~~~ compilation terminated. zmq.target.mk:101: recipe for