exclude/eligible don't get passed to crossbar

#1

(in python)

using the form of:

self.publish(topic, content, exclude=[foo], eligible=[foo])

per the autobahn.ws documentation at http://autobahn.ws/js/reference_wampv1.html#publish-and-subscribe; these get dropped somewhere and never make it to crossbar. is the documentation out of date? autobahn.wamp.protocol suggests that i should instead be using options=types.PublishOptions at about line 1008.

class ApplicationSession(BaseSession):

[…]

def publish(self, topic, *args, **kwargs):

[…]

if ‘options’ in kwargs and isinstance(kwargs[‘options’], types.PublishOptions):

options = kwargs.pop(‘options’)

msg = message.Publish(request_id, topic, args=args, kwargs=kwargs, **options.message_attr())

else:

options = None

msg = message.Publish(request_id, topic, args=args, kwargs=kwargs)

it looks like this reference documentation should be changed to something more like publish(topic, content, options=PublishOptions(exclude=[list], eligible=[list], …))

in autobahn.wamp.types, class PublishOptions starts as:

class PublishOptions(object):

“”"

Used to provide options for subscribing in

:func:autobahn.wamp.interfaces.IPublisher.publish.

“”"

should the doc note for this read differently such that it is for publishing rather than subscribing?

-david

0 Likes

#2

(in python)

using the form of:

    /self.publish(topic, content, exclude=[foo], eligible=[foo])/

per the autobahn.ws documentation
at http://autobahn.ws/js/reference_wampv1.html#publish-and-subscribe;

http://autobahn.ws/js/reference_wampv1.html#autobahn-legacy-wamp-v1-documentation

Note the word "deprecated".

Also: this is for AutobahnJS, not AutobahnPython

these get dropped somewhere and never make it to crossbar. is the
documentation out of date? autobahn.wamp.protocol suggests that i should
instead be using options=types.PublishOptions at about line 1008.

class ApplicationSession(BaseSession):
     [...]
     def publish(self, topic, *args, **kwargs):
         [...]
         if 'options' in kwargs and isinstance(kwargs['options'],
types.PublishOptions):
             options = kwargs.pop('options')
             msg = message.Publish(request_id, topic, args=args,
kwargs=kwargs, **options.message_attr())
         else:
             options = None
             msg = message.Publish(request_id, topic, args=args,
kwargs=kwargs)

it looks like this reference documentation should be changed to
something more like publish(topic, content,
options=PublishOptions(exclude=[list], eligible=[list], ...))

in autobahn.wamp.types, class PublishOptions starts as:

class PublishOptions(object):
     """
     Used to provide options for subscribing in
     :func:`autobahn.wamp.interfaces.IPublisher.publish`.
     """

should the doc note for this read differently such that it is for
publishing rather than subscribing?

The docs are correct. Please see above.

···

Am 04.12.2015 um 01:15 schrieb David Ford:

-david

--
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/9a231672-216a-4e3a-9a51-0fcf55af25d4%40googlegroups.com
<https://groups.google.com/d/msgid/autobahnws/9a231672-216a-4e3a-9a51-0fcf55af25d4%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

0 Likes

#3

it pays to delete one’s bookmarks and refresh :smiley: thank you for the reply!

0 Likes

#4

:slight_smile: np. cheers, /Tobias

···

Sent from Mobile (Google Nexus 5)

Am 04.12.2015 5:50 nachm. schrieb “David Ford” firefig...@gmail.com:

it pays to delete one’s bookmarks and refresh :smiley: thank you for the reply!

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/26ce30f1-2c4d-4f47-87ee-37e925191867%40googlegroups.com.

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

0 Likes