Skip to main content

kafka simple using

Project description

消息队列,基于 redis 或者 beanstalk

You can install pysubman from PyPI with

$ pip install pysubman

Version update

  • 处理线程异常

  • 修改 redis rpop to brpop

  • 添加 redis 消息默认前缀 mq:

  • 添加 redis 消息队列, <C-c> 终止处理

  • 1.10.4 添加 Producer put 返回值

  • 1.10.4 添加 beanstalkd;修改 Customer Producer 接口

  • 1.10.2 去掉 logging

  • 1.10.0 将 kafka 迁移到 beanstalk

Getting Started


#!/usr/bin/env python
# coding=utf-8

import json
import time
from pysubman.redis.client import Client

client = Client(host="")
message = json.dumps({
    "type": "linkedin",
    "time": time.time(),
client.publish("oauth:linkedin", message)


#!/usr/bin/env python
# coding=utf-8

from pysubman.redis.client import Client
from pysubman.redis.service import Service
from pysubman.redis.subscribe import Subscriber

services = Service()

def handler_email_job(body):
    logging.warn(("body", body))

def main():

if __name__ == "__main__":


  • 添加 tcp 链接超时处理


If you need help using pysubman or have found a bug, please open a github issue.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysubman- (9.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page