Hell yeah finally it works. I tried so many example codes on forums, but somehow there where some tiny errors(or too old), yours worked. Thx so much for making this tutorial.
Another question / request for a video if you have the time is an explanation of the poller. If I understand right, it's for managing the different sockets and managing multi-threading? is that correct or am I way off? Still learning right now
Appreciate the video man thanks :) I am in a bit of a mess right now trying to figure out how to understand ZMQ in both python and C# since there is an api written in pyzmq which I'm trying to port functionality over to c# It's really confusing since the implementation of ZMQ is slightly different in NetMQ (the c# binding of ZMQ) vs pyzmq. For example, the way ZMQ Context is handled is totally different. I still don't really understand what context actually is, why it's obsolete in NetMQ but not pyzmq, and how to 'translate' the same design pattern from an already written python script with pyzmq to work using netzmq :s
I need to make exactly this but with a queue which store the messages if the SUB part is not listening (and when SUB is ready, send all the messages in the queue) anyone could help me?
From what i understand you will have to implement this functionality yourself. Check this out for somewhere to start: stackoverflow.com/questions/49795764/about-zeromq-and-using-an-alternative-storage-to-store-messages
This was a quick example of how to use zeromq. You can use whatever method you would like to get this functionality. This was specifically geared towards zeromq because I couldn't find any videos explaining how to use it..
Thanks for the video. In the example the sub has to consume all messages on the queue even if it is only interested in a sub-set. I can see that this would be useful for broadcast messages, but it seems like an unnecessary overhead compared to managing multiple domain-specific queues where the sub knows that every message on its domain queue is useful. Is this just how ZMQ works compared to 'standard' message brokers? Thanks.
@@trecsss Thanks for the swift reply. As a newcomer to ZMQ I was concerned that the single queue approach was a limitation of ZMQ, but after a it more research I now understand that its a much more flexible tool than that. Thanks again for the intro video. Great to see a get-started example in Python.
I really appreciate that you try to teach something but please at least follow some basic python coding rules. I want to point out that this is not how a python code should look like and not how ZeroMQ should be used. You should always follow the PEP8 guidelines. Also you have a lot redundant parentheses. It's better to use "is" when comparing to None because it's faster. Also to avoid all of these useless ifs you could just subscribe for certain topics and listen only for them not for all messages. That way you could avoid this strange dict structure that you are sending and will optimize the network traffic.
Thanks for the feedback. I am mainly a Java developer and I rarely use python so my overall knowledge about the language is rather limited. If you make a video with the corrections you just mentioned I will pin a comment linking to your video.
Everything I need to know in less than 20 minutes! Thank you!
I appreciate the feedback. Thanks for watching
Hell yeah finally it works. I tried so many example codes on forums, but somehow there where some tiny errors(or too old), yours worked. Thx so much for making this tutorial.
No problem. Glad this content helped you out.
Your videos are great. Well explained
Good tutorial for beginners. Thanks.
Excellent, to the point, crystal clear! Can you do a similar tutorial for the MQTT in Python?
Thank you! this is simple and clean!!
Thank you. Very clear.
You're welcome. Thanks for watching
I appreciate the comments. Is there anything else that you guys want a video on??
Thank you, this is a great help for beginners! 🙏🏼 I'd like to see how sending messages via command line to a python subscriber works.
Thank You!! Helped me a lot.
Glad I could help
Thanks for this great tutorial! It helps a lot :)
Thanks for watching and I'm glad it helped you out!
brilliant.
i know Im pretty off topic but do anyone know a good site to stream new series online ?
@Abraham Rodrigo Lately I have been using FlixZone. You can find it by googling =)
@Santiago Donald yup, I've been using Flixzone for years myself =)
@Santiago Donald thank you, I signed up and it seems like a nice service =) I really appreciate it!
@Abraham Rodrigo No problem xD
Great tutorial! I have been looking to better understand this.
Glad it was helpful!
Great and clear tutorial. Only question is, can you use this with a proxy address that requires a password instead of using local host?
Thanks man ❤️
Happy to help
legend
Another question / request for a video if you have the time is an explanation of the poller. If I understand right, it's for managing the different sockets and managing multi-threading? is that correct or am I way off? Still learning right now
Appreciate the video man thanks :) I am in a bit of a mess right now trying to figure out how to understand ZMQ in both python and C# since there is an api written in pyzmq which I'm trying to port functionality over to c#
It's really confusing since the implementation of ZMQ is slightly different in NetMQ (the c# binding of ZMQ) vs pyzmq. For example, the way ZMQ Context is handled is totally different. I still don't really understand what context actually is, why it's obsolete in NetMQ but not pyzmq, and how to 'translate' the same design pattern from an already written python script with pyzmq to work using netzmq :s
thank you!
Your welcome. Glad I could help.
Can you do a video about topics? Reading through the documentation is a little confusing. Please and thank you.
I need to make exactly this but with a queue which store the messages if the SUB part is not listening (and when SUB is ready, send all the messages in the queue) anyone could help me?
From what i understand you will have to implement this functionality yourself. Check this out for somewhere to start: stackoverflow.com/questions/49795764/about-zeromq-and-using-an-alternative-storage-to-store-messages
My guy looking like a AI deep fake 😂
Lol Oh, You didn't know?? GPT-3 is my brother lol
Did you give a reason of the point for using this? Why not just normally make a tcp client/server like normal? You don't need extra modules for that.
This was a quick example of how to use zeromq. You can use whatever method you would like to get this functionality. This was specifically geared towards zeromq because I couldn't find any videos explaining how to use it..
if ı want to send the whole list as message what should ı do?
Thank you. Can you upload a series here or to Udemy please?
Thanks for the video. In the example the sub has to consume all messages on the queue even if it is only interested in a sub-set. I can see that this would be useful for broadcast messages, but it seems like an unnecessary overhead compared to managing multiple domain-specific queues where the sub knows that every message on its domain queue is useful. Is this just how ZMQ works compared to 'standard' message brokers? Thanks.
This video is just a quick demo of how to use zeromq in Python. There aren't any principles of message queue design or best practices done here.
@@trecsss Thanks for the swift reply. As a newcomer to ZMQ I was concerned that the single queue approach was a limitation of ZMQ, but after a it more research I now understand that its a much more flexible tool than that. Thanks again for the intro video. Great to see a get-started example in Python.
Bro, why are you using Python 2.7 ?
Thanks
Using python 3.7.7 i get "unicode not allowed error", change line 8 to "socket.setsockopt_string(zmq.SUBSCRIBE, ' ')"
Did it work once you changed the line to socket.setsockopt_string(zmq.SUBSCRIBE, '')
@@trecsss no its show all the list[100,200,300]
Using the parenthesis in Python while and if statements is ugly though. Don't. It ain't JavaScript ;)
Duly noted lol
Martinez Shirley Young Joseph Smith Sandra
Jackson Charles Thompson Kimberly Walker Margaret
Lee Donna Martin Sandra Brown Donna
I really appreciate that you try to teach something but please at least follow some basic python coding rules. I want to point out that this is not how a python code should look like and not how ZeroMQ should be used. You should always follow the PEP8 guidelines. Also you have a lot redundant parentheses. It's better to use "is" when comparing to None because it's faster. Also to avoid all of these useless ifs you could just subscribe for certain topics and listen only for them not for all messages. That way you could avoid this strange dict structure that you are sending and will optimize the network traffic.
Thanks for the feedback. I am mainly a Java developer and I rarely use python so my overall knowledge about the language is rather limited. If you make a video with the corrections you just mentioned I will pin a comment linking to your video.
@krisgosp waiting on that video big homie !
Moore Angela Smith Anna Miller Steven