Skip to main content

kafka simple using

Project description

消息队列,基于 beanstalk

You can install pysubman from PyPI with

$ pip install pysubman

Version update

  • 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 time
import logging
import pysubman

class EMAIL(object):
    Tube = "t-101"
    Topic = "EMAIL"
    Info = [
        ("TemplateUrl", "%s"),
        ("Params", "%s"),

client = pysubman.Producer(address="")

while True:
    now_time = time.time()
    client.put(EMAIL, "", "chaungwang: {}".format(now_time))


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

import logging
import pysubman

service = pysubman.Service()

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

def main():
    consumer = pysubman.Consumer(address="").tube("t-101")

if __name__ == "__main__":


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.

Files for pysubman, version 1.10.5
Filename, size File type Python version Upload date Hashes
Filename, size pysubman-1.10.5-py2.7.egg (17.7 kB) File type Egg Python version 2.7 Upload date Hashes View
Filename, size pysubman-1.10.5.tar.gz (6.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page