Autobahn-JS doesn't receive subscription for publish on same page (sample)

I have a server setup and I am trying the example code in a browser (chrome 81.x) on

    // 1) subscribe to a topic
   function onevent(args) {
      console.log("Event:", args[0]);
   session.subscribe('com.myapp.hello', onevent);

   // 2) publish an event
   session.publish('com.myapp.hello', ['Hello, world!']);

I don’t see the subscribe message. I have since developed my own application and I see the same thing. A web page that publishes the event doesn’t have it’s subscribe called. In other words, if I have the same page open in 2 windows and have page A publish a message, page B gets the subscribe event, but page A does not.

Not sure if this is an issue with autobahn-js or with

I previously had a WAMP v1 implementation (with a custom router) that supported this. It’s kind of critical for me to make sure a page sees its own publish messages. There is a lot of work for me to convert my code if this isn’t possible.

Hello! I usually work with the Python libraries, but by default the session publishing a thing doesn’t get its “own” publish back. However, you can include options setting exclude_me: false as a third argument to the publish to change that.

it’s in the documentation.
But it’s the fourth parameter for JS:

Publishing an event to a
topic is done by calling the publish method
on the session object.

Thanks for your help!

CONFIDENTIALITY NOTICE: This message is confidential and is intended only for the individual(s) or entities named. It may also be privileged or otherwise protected by work product or other legal rules. If you have received it by mistake, please let us know immediately by e-mail reply and delete it from your system. You may not copy this message or disclose its contents to anyone.