Menu

ZeroMQ Dealer-REP Socket Combination Labview Example Code

2021-09-21
2021-09-28
  • Sandhya Lakshmi

    Sandhya Lakshmi - 2021-09-21

    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
  • Martijn Jasperse

    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

     
  • Sandhya Lakshmi

    Sandhya Lakshmi - 2021-09-27

    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

     
  • Martijn Jasperse

    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

     
  • Sandhya Lakshmi

    Sandhya Lakshmi - 2021-09-28

    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 ?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.