crossbar icon indicating copy to clipboard operation
crossbar copied to clipboard

PubSub not working between RLink connected routers

Open Skully17 opened this issue 3 years ago • 1 comments

We are having an issue with publish in crossbar io 22.6.1 and previous versions with Rlinks. We require Rlinks to forward local topic publications and RPC’s to cloud and vice versa.

Setup: There is a crossbar router running on a local machine and another running on an AWS machine. Both have connected JS clients using Autobahn-JS which have 4 buttons to:

  1. Subscribe to “com.browser.hub”
  2. Subscribe to “com.browser.cloud”
  3. Publish to “com.browser.hub”
  4. Publish to “com.browser.cloud”

Steps:

  1. On the cloud machine, I subscribe to “com.browser.cloud” then subscribe to “com.browser.hub”
  2. On the local machine, I subscribe to “com.browser.cloud” then subscribe to “com.browser.hub”
  3. On the cloud machine, I publish to “com.browser.cloud” then publish to “com.browser.hub”
  4. On the local machine, I publish to “com.browser.cloud” then publish to “com.browser.hub”

You can see from the logs that the first 3 publishes are successfully sent to 2 receivers (sub on local and cloud) but the last one only goes to 1 receiver (sub on local): image image image image This means that the second subscription is not being forwarded over the RLink. When making the subscriptions, this error message always accompanies subscriptions that are failed to be forwarded: image I believe that there is an issue with the syncing of sub IDs over RLinks.

Skully17 avatar Oct 11 '22 14:10 Skully17

I found a poblem with how the subscription was being handled in rlink.py. I believe the wrong ID was being handled and stored for subscriptions being sent over the rlink. I changed the subscription code to work similar to registering, which was fixed in #1789, and it works for me. I have also made a PR for this change: #2055

Skully17 avatar Oct 13 '22 12:10 Skully17