Hello Cornelius and Justin, 

I was at last able to get my forwarder to work and it was my mistake.

My sender code which was like:

def sendMessage():
    context = zmq.Context()
    sender = context.socket(zmq.PUB)
    sender.bind('tcp://127.0.0.1:5558')
    sender.send("This is the sender")

was the actual problem, i got to know from my reading that call to socket.bind 
should happen only once, so i changed my sender code to
something like:

socket = context.socket(zmq.PUB)
socket.bind('tcp://127.0.0.1:4443')

def sendMessage(socket,message):
    try:
        socket.send(message)
    except:
        print "Unable To Send Message"

and than i was able to send messages but this gets me into two three more 
problems, i hope you guys will help me out is giving me some
ideas about this.


 


Date: Mon, 19 Mar 2012 13:18:59 -0500
From: cornto...@cct.lsu.edu
To: zeromq-dev@lists.zeromq.org
Subject: Re: [zeromq-dev] FW: Help With Regard To the ZMQ Forwarder


                From the looks of your code https://gist.github.com/2119078, 
you define functions for sending and receiving messages, but you do not call 
them, like you do with Forwarder.py.
                
Also for the sake of easier testing, you may want to have your sender script to 
send multiple messages to allow you to see what's going on.-- 
Cornelius Toole
Sent with Sparrow


                 
                On Monday, March 19, 2012 at 11:59 AM, Symbian Projects wrote:
                
                    



Thanks for your reply cornelius.

I am now using netstat for checking the blocked ports.

Meanwhile i have uploaded the code here https://gist.github.com/2119078

and there is no proprietary code at the moment its the basic code where i am 
trying to get the forwarder working.

and your last point is very valid, i start first the forwarder, than i start 
the receiver and than the sender to send messages. From this the point you have 
mentioned can be a problem.

I will be grateful if you can just have a look at the code its very small and 
let me know if i am doing some wrong.

Regards,
Ronald

Date: Mon, 19 Mar 2012 11:24:40 -0500
From: cornelius.to...@gmail.com
To: zeromq-dev@lists.zeromq.org
Subject: Re: [zeromq-dev] FW: Help With Regard To the ZMQ Forwarder


                
                    Ronald,
                
You can use netstat. You're using windows, right? 
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/netstat.mspx?mfr=true
As for debugging your code, can you paste the code into a paste bin or 
gist.github?Try this for instance: https://gist.github.com/
                You omit out any code that is proprietary if this for work or 
research.
After you check your ports, you should think about whether the order in which 
ports are being opened is an issue. For instance, your forwarder device binds 
the outgoing port, but what if the  receiver thread starts before the device?

-- 
Cornelius Toole
Sent with Sparrow


                  
                On Monday, March 19, 2012 at 11:11 AM, Symbian Projects wrote:
                    



Hello Justin,

Thanks again for reply. 


I have tried restarting the platform, and i have also checked it in two 
different machines, and in both machine it doesn't work.

I am clue of ideas how to debug this problem as the no of line of code is very 
small too. 

Is there any way i  can diagnose that the port is closed or blocked something 
like that.

Thanks,
Ronald

> From: jhc...@gmail.com
> Date: Mon, 19 Mar 2012 15:27:12 +0000
> To: zeromq-dev@lists.zeromq.org
> Subject: Re: [zeromq-dev] FW: Help With Regard To the ZMQ Forwarder
> 
> If the same code with same libraries no longer works then clearly you
> have a runtime issue. Have you tried restarting the platforms? Maybe
> you should have a look at the order in which things are happening. Are
> you subscribing before the messages are sent?
> 
> Perhaps its an IP filtering issue. Make sure the ports/proto are not blocked.
> 
> On Mon, Mar 19, 2012 at 10:42 AM, Symbian Projects
> <proj_symb...@live.com> wrote:
> > Hello Justin,
> >
> > Thanks a lot for your reply.
> >
> > Yes i remember for what the thread was started, and that time my forwarder
> > was running great without any problem. I was able to send and receive
> > messages between my publisher and subscribers.
> >
> > Than i added the signals to clean the sockets.
> >
> > After that nothing worked and now even the old code is not working, which
> > was used to work earlier.
> >
> > I will be very grateful if you just have a look at the code i have sent and
> > tell me is there something wrong in that. Please !!
> 
> -- 
> Justin Cook
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
                                          
_______________________________________________zeromq-dev mailing 
listzeromq-dev@lists.zeromq.orghttp://lists.zeromq.org/mailman/listinfo/zeromq-dev
                  
                  
                  
                  
                
                    

                
            
_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev                             
          
_______________________________________________zeromq-dev mailing 
listzeromq-dev@lists.zeromq.orghttp://lists.zeromq.org/mailman/listinfo/zeromq-dev
                 
                 
                 
                 
                
                 
                
                    

                
            
_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev                             
          
_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to