wamp.subscription.lookup, deferred issue

#1

Hello,

I am trying to get the subscription ID for a certain procedure, but it keeps returning as a deferred. I can’t seem to figure out a way to get the actual ID.

To get the ID, my code is as follows:

subID = self.call(‘wamp.subscription.lookup’, [u’com.myapp.living’])

printing subID returns “<Deferred at 0x************>”

I tried using callbacks to a function, but it isn’t being called.

Please let me know if you need more information.

(I am using python)

Thanks in advanced for your help,

Sohit

0 Likes

#2

Hi,

Have you tried subID = yield from self.call(‘wamp.subscription.lookup’, [u’com.myapp.living’])? Since self.call is a coroutine you must wait for its result.

···

On Mon, Aug 17, 2015 at 4:24 PM, Sohit Pal sohi...@gmail.com wrote:

Hello,

I am trying to get the subscription ID for a certain procedure, but it keeps returning as a deferred. I can’t seem to figure out a way to get the actual ID.

To get the ID, my code is as follows:

subID = self.call(‘wamp.subscription.lookup’, [u’com.myapp.living’])

printing subID returns “<Deferred at 0x************>”

I tried using callbacks to a function, but it isn’t being called.

Please let me know if you need more information.

(I am using python)

Thanks in advanced for your help,

Sohit

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.

To post to this group, send email to autob...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/autobahnws/a4145190-9201-4203-9504-d3fbb84c2123%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Johnny W. dos Santos

0 Likes

#3

The examples that I was looking at were for Javascript and told me to encompass my procedure name(s) in brackets [ ], but apparently that’s what was causing my problem. Simply removing them fixed the problem.

Also, are there any examples of how to use wamp.subscription.on_unsubscribe with python? I can only find it in javascript.

Thanks again,

Sohit

···

On Monday, August 17, 2015 at 3:47:39 PM UTC-4, Johnny W. Santos wrote:

Hi,

Have you tried subID = yield from self.call(‘wamp.subscription.lookup’, [u’com.myapp.living’])? Since self.call is a coroutine you must wait for its result.

On Mon, Aug 17, 2015 at 4:24 PM, Sohit Pal soh...@gmail.com wrote:

Hello,

I am trying to get the subscription ID for a certain procedure, but it keeps returning as a deferred. I can’t seem to figure out a way to get the actual ID.

To get the ID, my code is as follows:

subID = self.call(‘wamp.subscription.lookup’, [u’com.myapp.living’])

printing subID returns “<Deferred at 0x************>”

I tried using callbacks to a function, but it isn’t being called.

Please let me know if you need more information.

(I am using python)

Thanks in advanced for your help,

Sohit

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.

To post to this group, send email to auto...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/autobahnws/a4145190-9201-4203-9504-d3fbb84c2123%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Johnny W. dos Santos

0 Likes

#4

Hi Sohit!

There are no Python examples for this specific feature. ‘wamp.subscription.on_unsubscribe’ is handled via the usual PubSub mechanisms, i.e. it is a topic that you subscribe to.

Regards,

Alex

···

Am Dienstag, 18. August 2015 15:28:07 UTC+2 schrieb Sohit:

The examples that I was looking at were for Javascript and told me to encompass my procedure name(s) in brackets [ ], but apparently that’s what was causing my problem. Simply removing them fixed the problem.

Also, are there any examples of how to use wamp.subscription.on_unsubscribe with python? I can only find it in javascript.

Thanks again,

Sohit

On Monday, August 17, 2015 at 3:47:39 PM UTC-4, Johnny W. Santos wrote:

Hi,

Have you tried subID = yield from self.call(‘wamp.subscription.lookup’, [u’com.myapp.living’])? Since self.call is a coroutine you must wait for its result.

On Mon, Aug 17, 2015 at 4:24 PM, Sohit Pal soh...@gmail.com wrote:

Hello,

I am trying to get the subscription ID for a certain procedure, but it keeps returning as a deferred. I can’t seem to figure out a way to get the actual ID.

To get the ID, my code is as follows:

subID = self.call(‘wamp.subscription.lookup’, [u’com.myapp.living’])

printing subID returns “<Deferred at 0x************>”

I tried using callbacks to a function, but it isn’t being called.

Please let me know if you need more information.

(I am using python)

Thanks in advanced for your help,

Sohit

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.

To post to this group, send email to auto...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/autobahnws/a4145190-9201-4203-9504-d3fbb84c2123%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Johnny W. dos Santos

0 Likes

#5

Hi Alex,

It ended up being alot easier than I imagined, it was exactly as you said, just a topic to subscribe to.

Thanks,

Sohit

···

On Friday, August 21, 2015 at 7:26:20 AM UTC-4, Alexander Gödde wrote:

Hi Sohit!

There are no Python examples for this specific feature. ‘wamp.subscription.on_unsubscribe’ is handled via the usual PubSub mechanisms, i.e. it is a topic that you subscribe to.

Regards,

Alex

Am Dienstag, 18. August 2015 15:28:07 UTC+2 schrieb Sohit:

The examples that I was looking at were for Javascript and told me to encompass my procedure name(s) in brackets [ ], but apparently that’s what was causing my problem. Simply removing them fixed the problem.

Also, are there any examples of how to use wamp.subscription.on_unsubscribe with python? I can only find it in javascript.

Thanks again,

Sohit

On Monday, August 17, 2015 at 3:47:39 PM UTC-4, Johnny W. Santos wrote:

Hi,

Have you tried subID = yield from self.call(‘wamp.subscription.lookup’, [u’com.myapp.living’])? Since self.call is a coroutine you must wait for its result.

On Mon, Aug 17, 2015 at 4:24 PM, Sohit Pal soh...@gmail.com wrote:

Hello,

I am trying to get the subscription ID for a certain procedure, but it keeps returning as a deferred. I can’t seem to figure out a way to get the actual ID.

To get the ID, my code is as follows:

subID = self.call(‘wamp.subscription.lookup’, [u’com.myapp.living’])

printing subID returns “<Deferred at 0x************>”

I tried using callbacks to a function, but it isn’t being called.

Please let me know if you need more information.

(I am using python)

Thanks in advanced for your help,

Sohit

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.

To post to this group, send email to auto...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/autobahnws/a4145190-9201-4203-9504-d3fbb84c2123%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Johnny W. dos Santos

0 Likes