v1 python 2nd subscribe to same event fails?

7 views
Skip to first unread message

Greg Fausak

unread,
Jul 29, 2014, 5:02:32 PM7/29/14
to autob...@googlegroups.com
Has anybody seen this?  I subscribe to the same publication many times in javascript.  Took me a while to find this.  In the code below only the fuse_corral_process gets called.  If I switch the order, the popup_status_processes gets called.  I had to create a function that called these two to make it work.

...
self.subscribe("http://example.com/site/state/name/popup_status", self.popup_status_processes)
self.subscribe("http://example.com/site/state/name/popup_status", self.fuse_corral_process)
...

-g

Tobias Oberstein

unread,
Jul 29, 2014, 7:55:18 PM7/29/14
to autob...@googlegroups.com
Hi Greg,

Am 29.07.2014 23:02, schrieb Greg Fausak:
> Has anybody seen this? I subscribe to the same publication many times
> in javascript. Took me a while to find this. In the code below only
> the fuse_corral_process gets called. If I switch the order, the
> popup_status_processes gets called. I had to create a function that
> called these two to make it work.

Mmh. At least the latest version of AutobahnJS WAMPv1 did allow to
subscribe multiple event handlers. Only 1 WAMP subscribe would be sent.
The list of event handlers managed locally.

https://github.com/tavendo/AutobahnJS/blob/wamp1/autobahn/autobahn.js#L829

So, no, I have no clue, sorry,

/Tobias

>
> ...
> self.subscribe("http://example.com/site/state/name/popup_status",
> self.popup_status_processes)
> self.subscribe("http://example.com/site/state/name/popup_status",
> self.fuse_corral_process)
> ...
>
> -g
>
> --
> 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
> <mailto:autobahnws+...@googlegroups.com>.
> To post to this group, send email to autob...@googlegroups.com
> <mailto:autob...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/autobahnws/06c02a56-7540-4f33-a7cb-2e26e7d0820e%40googlegroups.com
> <https://groups.google.com/d/msgid/autobahnws/06c02a56-7540-4f33-a7cb-2e26e7d0820e%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Greg Fausak

unread,
Jul 30, 2014, 9:46:08 AM7/30/14
to autob...@googlegroups.com
Hi Tobias,

The javascript works fine!  I subscribe to the same event there many times.  I was asking about python.  It seems I can't subscribe twice to the same event topic in python.  I ended up writing an intermediate function, which in turn called each of the two functions I wanted to call.  I then just registered the intermediate function.  It called the other two with the same arguments as if they were called by the subscribe itself.  That seemed to work.  It just seemed weird that I couldn't have two subscriptions on the same event.

Thanks for the follow up, I have a good work around.

-g

Tobias Oberstein

unread,
Jul 30, 2014, 10:38:51 AM7/30/14
to autob...@googlegroups.com
Hi Greg,

Am 30.07.2014 15:46, schrieb Greg Fausak:
> Hi Tobias,
>
> The javascript works fine! I subscribe to the same event there many
> times. I was asking about python. It seems I can't subscribe twice to

Ahh.

> the same event topic in python. I ended up writing an intermediate

That's right. AutobahnPython WAMP1 did not allow that.

> function, which in turn called each of the two functions I wanted to
> call. I then just registered the intermediate function. It called the
> other two with the same arguments as if they were called by the
> subscribe itself. That seemed to work. It just seemed weird that I
> couldn't have two subscriptions on the same event.
>
> Thanks for the follow up, I have a good work around.

Ok.

/Tobias

Greg Fausak

unread,
Jul 30, 2014, 11:17:50 AM7/30/14
to autob...@googlegroups.com
Tobias,

v2 has the ability for python to register multiple functions to the same event?

cool :-)

definitely caught me by surprise.

-g
Reply all
Reply to author
Forward
0 new messages