Skip to content

Socket is not connected #28

@jasbeard

Description

@jasbeard

So I'm trying to read stuff at nsqd from a simple flask server, I followed the docs for the Consumer: high-level message reader

server.py

from flask import Flask
import gnsq

consumer = gnsq.Consumer('test_topic', 'test_channel', '0.0.0.0:32807')

@consumer.on_message.connect
def handler(consumer, message):
    print ('got message:', message.body)

consumer.start()

app = Flask(__name__)

@app.route("/")
def hello():
    return "Flasky"

and all I get when running the server is
[0.0.0.0:32807] connection failed (NSQSocketError(57, 'Socket is not connected')).
I have exhausted the ports I know to connect but no luck. Kindly help?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions