I cant get my py client to subscribe properly

#1

I cant get my py client to subscribe properly.

Here are my files.

client.py (785 Bytes)

main.py (776 Bytes)

PubSubHandler.py (744 Bytes)

0 Likes

#2

I can subscribe but, when i publish something the callback is not called.

···

On Thursday, October 24, 2013 10:48:13 PM UTC+3, Linh Le wrote:

I cant get my py client to subscribe properly.

Here are my files.

0 Likes

#3

Hi,

there a multiple problems with the code, e.g. on the client side, you do

self.subscribe("", self.onPublishEvent)

which won’t subscribe to anything at all, since the topic URI is invalid (empty string).

I suggest you start by taking an example like

https://github.com/tavendo/AutobahnPython/tree/master/examples/wamp/pubsub/simple/example1

verify that it works for you (unmodified) and then start to modify it to your needs.

Hope this gets you started,
/Tobias

···

Am Donnerstag, 24. Oktober 2013 21:48:13 UTC+2 schrieb Linh Le:

I cant get my py client to subscribe properly.

Here are my files.

0 Likes

#4

Hello.

Oh damn…
Sorry these were not meant to be sent i mixed up my working folders.
I am so sorry. Hope i haven’t offended anyone with my profanity.

These are the actual files.
As it seems in the handler when a client publishes something the handler prints out the message(line 33) but after that the other clients do not get the message.
The clients are the client.py files.

Again sorry for my profanity.

Best regards :).
Linh

client.py (690 Bytes)

main.py (654 Bytes)

PubSubHandler.py (754 Bytes)

···

On Friday, October 25, 2013 12:19:29 PM UTC+3, Tobias Oberstein wrote:

Hi,

there a multiple problems with the code, e.g. on the client side, you do

self.subscribe("", self.onPublishEvent)


which won’t subscribe to anything at all, since the topic URI is invalid (empty string).

I suggest you start by taking an example like

https://github.com/tavendo/AutobahnPython/tree/master/examples/wamp/pubsub/simple/example1

verify that it works for you (unmodified) and then start to modify it to your needs.

Hope this gets you started,
/Tobias

Am Donnerstag, 24. Oktober 2013 21:48:13 UTC+2 schrieb Linh Le:

I cant get my py client to subscribe properly.

Here are my files.

0 Likes

#5

Hello.

Oh damn....
Sorry these were not meant to be sent i mixed up my working folders.
I am so sorry. Hope i haven't offended anyone with my profanity.

These are the actual files.
As it seems in the handler when a client publishes something the handler
prints out the message(line 33) but after that the other clients do not
get the message.
The clients are the client.py files.

Again sorry for my profanity.

Nothing to be sorry;) I have corrected your code .. checkout the attachments ..

I'd recommend leaving logging on (note that if you don't activate Twisted loggin you might not get anything using "print"), and set debugWamp = True. This allows you to watch WAMP level messaging on the wire ..

/Tobias

client.py (912 Bytes)

main.py (724 Bytes)

PubSubHandler.py (785 Bytes)

···

Am 25.10.2013 20:23, schrieb Linh Le:

Best regards :).
Linh

On Friday, October 25, 2013 12:19:29 PM UTC+3, Tobias Oberstein wrote:

    Hi,

    there a multiple problems with the code, e.g. on the client side, you do

    self.subscribe("", self.onPublishEvent)

    which won't subscribe to anything at all, since the topic URI is
    invalid (empty string).

    I suggest you start by taking an example like

    https://github.com/tavendo/AutobahnPython/tree/master/examples/wamp/pubsub/simple/example1
    <https://github.com/tavendo/AutobahnPython/tree/master/examples/wamp/pubsub/simple/example1>

    verify that it works for you (unmodified) and then start to modify
    it to your needs.

    Hope this gets you started,
    /Tobias

    Am Donnerstag, 24. Oktober 2013 21:48:13 UTC+2 schrieb Linh Le:

        I cant get my py client to subscribe properly.

        Here are my files.

--
You received this message because you are subscribed to the Google
Groups "Autobahn" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to autobahnws+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Likes