Comments (11)
any update on this?
from txzmq.
You should do mode push in "connect" mode and pull in "bind" mode. Otherwise you end up with no clients on bind.
from txzmq.
That's not true at all... bind push and connect pull is a very widely used ZMQ system... in fact it's the third listed in the guide:
http://zguide.zeromq.org/page:all#Divide-and-Conquer
And a link to the code
http://zguide.zeromq.org/py:taskvent
You start all of your workers/pullers first regardless of whether or not the pusher is bind or connect.
from txzmq.
Sorry for not being clear enough. You can use push/pull with any combination of bind/connect, but for this particular example it doesn't work.
Sending (pushing) to 'bind' socket without pull consumers would result in EAGAIN from ZMQ, and txZMQ doesn't do queueing on its own. This is what happened in the issue description.
from txzmq.
If I connect with multiple (or one) pull consumers first and then bind with a push producing on an interval of one second, I still get EAGAIN from the example. So even though it's quite capable of consuming them quicker than they are produced, they won't be.
from txzmq.
You would get EAGAIN unless pull consumer is connected. Connection doesn't happen simultaneously.
I've pushed change to examples to skip such sends.
from txzmq.
I'm getting EAGAIN when a pull consumer is connected. I have 12 pull consumers connected and the interval is 1 second on the push. There's no way that one isn't connected at send. In bind-pull/connect-push, 1 consumer can handle sends 100x this (interval of 0.01 seconds)
from txzmq.
Please try adding try/except as in 39e841a, and see what happens. First send in this example happens not after 1 second, but immediately.
from txzmq.
Alright, so I just tested it as-is with 1 second interval (in the reactor.callLater call) and with a 0.01 interval. It seems like it successfully produced and consumed a call every time, but regardless of interval, the second logged call is always the "Skipping, no pull consumers..." which seems like it's not correct, since the first listed item and the third listed item are separated by 1x interval, not 2x like they should be if a call failed to find pullers. I'm just wondering what's causing that initial EAGAIN, which I think is erroneous.
from txzmq.
I don't see your code, so it's actually hard to tell what's going on. That EAGAIN is coming from ZMQ itself, not from the txZMQ wrapper. In synchronous version it would just block, txZMQ is async so it just errors back to the caller. You may decide whether you would like to queue outgoing messages, drop them or do anything else.
from txzmq.
I'm still using the push_pull.py example. I have a couple terminal windows open and I'm using typical command line arguments to set up one bind pusher and either one or a few connect pullers. If you do this, the second logged entry for the producer/pusher is always the EAGAIN fail message. I think this may be caused by the way that the example is setup, however. Give me a minute and I'll try a solution I think may work.
from txzmq.
Related Issues (20)
- Online API reference is missing HOT 2
- Latest version of pyzmq incompatible HOT 1
- Is it possible to implement a ZeroMQ Pair? HOT 6
- Timeout support HOT 23
- Is it possible to create txzmq daemon as twistd plugin? HOT 6
- Bug with publishing, unicode tag
- Incorrect (twice?) shutdown when registered for shutdown HOT 6
- Does txZMQ support iocp reactor HOT 2
- txzmq support for ZMQ 4.x HOT 3
- pub_sub.py example doesn't seem to work HOT 2
- pubsub (at least) doesn't work with python 3 HOT 2
- New release HOT 3
- Does this package support Python 3? HOT 2
- txzmq.ZmqREQConnection messageReceived code is returning weird results HOT 2
- Timeout handling in REP-REQ HOT 1
- Change txZMQ (from GPL) to a more permissive license (at least LGPL) HOT 19
- 'ZmqREPConnection' object has no attribute '_routingInfo' HOT 5
- txzmq/pubsub.py", line 26 -- exception cannot conatenate bytes HOT 1
- minor pylint issue with ZmqPubConnection
- VERSION does not match last tag HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from txzmq.