Hi,
I am trying to implement a ZeroMQ Dealer-REP Socket Combination,i.e. I am trying to Eliminate Req and place Dealer to send messages Asynchronously and a REP to get the sent message.(See the Attached Images For Reference ),But I am not able to achieve it as I read in the guide that the Dealer need some Empty flags.I am not sure how to make it and not sure whatever I am doing is also correct !
Running this does not give any message out
It would be good if you can provide me an example for the combination I need and help me to get it through.
Thanks in Advance,
Sandhya
Hi Sandhya,
When using the DEALER/ROUTER paradigms, you need to use multi-part messages. I recommend using the multi-part VIs instead of using the "more" option manually. The attached example shows the simple version where there is only one attached REP socket.
Thanks for the reply.I already found out that and code is working fine now..I gotta another doubt now : You can see the Error which I get in the attached file.Can you tell me why I am getting this Error ,any inputs appreciated.
You can find the error code values and descriptions in zmq-errors.txt. The error value shown means
EFSM: Operation cannot be accomplished in current state
This is common when using strict socket types - particularly REQ and REP, which must alternate between send and receive operations. REP cannot simply receive, it must reply.
EFSM typically indicates that a different socket type is applicable to your intended design pattern. ROUTER is a simple replacement, but perhaps PUB/SUB is more applicable if the information flow is unidirection.
Cheers,
Martijn
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for the response Martijn. I am using DEALER-REP Socket Combination since I am not concerned about the reply message. Could you suggest me some solution to overcome this Error ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am trying to implement a ZeroMQ Dealer-REP Socket Combination,i.e. I am trying to Eliminate Req and place Dealer to send messages Asynchronously and a REP to get the sent message.(See the Attached Images For Reference ),But I am not able to achieve it as I read in the guide that the Dealer need some Empty flags.I am not sure how to make it and not sure whatever I am doing is also correct !
Running this does not give any message out
It would be good if you can provide me an example for the combination I need and help me to get it through.
Thanks in Advance,
Sandhya
Last edit: Sandhya Lakshmi 2021-09-21
Hi Sandhya,
When using the DEALER/ROUTER paradigms, you need to use multi-part messages. I recommend using the multi-part VIs instead of using the "more" option manually. The attached example shows the simple version where there is only one attached REP socket.
Cheers,
Martijn
Hi Martijn,
Thanks for the reply.I already found out that and code is working fine now..I gotta another doubt now : You can see the Error which I get in the attached file.Can you tell me why I am getting this Error ,any inputs appreciated.
Thanks,
Sandhya
You can find the error code values and descriptions in zmq-errors.txt. The error value shown means
This is common when using strict socket types - particularly REQ and REP, which must alternate between send and receive operations. REP cannot simply receive, it must reply.
EFSM typically indicates that a different socket type is applicable to your intended design pattern. ROUTER is a simple replacement, but perhaps PUB/SUB is more applicable if the information flow is unidirection.
Cheers,
Martijn
Thank you for the response Martijn. I am using DEALER-REP Socket Combination since I am not concerned about the reply message. Could you suggest me some solution to overcome this Error ?