v1 python 2nd subscribe to same event fails?

#1

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

0 Likes

#2

Hi Greg,

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

···

Am 29.07.2014 23:02, schrieb Greg Fausak:

...
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.

0 Likes

#3

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

···

On Tuesday, July 29, 2014 4:02:32 PM UTC-5, Greg Fausak wrote:

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

0 Likes

#4

Hi Greg,

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

···

Am 30.07.2014 15:46, schrieb Greg Fausak:

0 Likes

#5

Tobias,

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

cool :slight_smile:

definitely caught me by surprise.

-g

···

On Wednesday, July 30, 2014 9:38:51 AM UTC-5, Tobias Oberstein wrote:

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

0 Likes