Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish/subscribe doesn't work when redis-oplog disabled #361

Open
afrokick opened this issue Sep 23, 2020 · 3 comments · May be fixed by #363
Open

Publish/subscribe doesn't work when redis-oplog disabled #361

afrokick opened this issue Sep 23, 2020 · 3 comments · May be fixed by #363

Comments

@afrokick
Copy link

Run it on local machine.
RedisOplog Version: 2.0.5
My config:

  "redisOplog": {
    "redis": {
      "port": 6379,
      "host": "127.0.0.1"
    },
    "retryIntervalMs": 10000,
    "mutationDefaults": {
      "optimistic": false,
      "pushToRedis": false
    },
    "overridePublishFunction": false,
    "debug": true
  }

As you can see, I turned off pushToRedis and overridePublishFunction.

When I subscribe to my user on tab1 and then change it on tab2, it doesn't update on tab1.

When I remove redis-oplog package, all works fine.

@edemaine
Copy link

Indeed, the code no longer responds to overridePublishFunction, as reported in #323. (This issue seems like a duplicate of that one.)

Instead, you can turn off/disable Redis Oplog by not setting redisOplog at all (or setting it to null).

@afrokick
Copy link
Author

@edemaine but I want to use Vent, so I need a config to connect to Redis

@edemaine
Copy link

That does seem like a good reason to add overridePublishFunction support back (and I see #359 is your issue for this -- again, this issue seems like a duplicate).

I believe one could just wrap this line in if (Config.overridePublishFunction) but I haven't tested. (It also seems likely that all following lines in that function should be wrapped by the same if, because you probably don't care about subscriptions in this case. But 8d6dd33#diff-3e18cf2294c02344381d224486ff0d2dL31-L34 suggests this isn't the old behavior.)

I'll try making a PR.

@edemaine edemaine linked a pull request Sep 23, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants