question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setting overridePublishFunction to false still publishes via Redis

See original GitHub issue

In Meteor 1.5.1 in redis-oplog 1.2.6, 1.2.6_1, and 1.2.6_2, whenever I set overridePublishFunction: false, I’m still seeing all of my app’s Meteor.publish(...) calls getting published with Redis.

I can see it in the debug output of redis-oplog and the publications are visually/functionally reactive in my app.

I was adding some special functionality with Vent, which is really cool BTW, and needed to add redis-oplog but I don’t want any of my publications (or app in general) to use redis-oplog (for now) except my Vent code. So I set overridePublishFunction: false, yet it’s still using redis-oplog. I do still have pushToRedis: true but I assumed this would be ignored if I have overridePublishFunction: false and use all Meteor.publish(...) calls.

I can make a repo but it’s pretty easy to reproduce. I created two Meteor apps from my redis-oplog-issues repo, set overridePublishFunction: false on both, made the second app point to the first app’s database and ran it on port 3002. Then when you click add twenty tasks, check one off to create a Scorecard, then click “Toggle Scorecards” it updates instantly in both apps via Redis because the Meteor.publish(...) calls are using Redis.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
theodorDiaconucommented, Feb 26, 2018

The reason is because of this: extendMongoCollection(); which overrides the .observeChanges() and .observe(). We either create observeChangesWithRedis() observeWithRedis() functions, either not execute those functions, either separate redis-vent into a separate package, which is a natural thing to do, but then we need to separate redis-connection to a package, so both redis-oplog and redis-vent can use it. I’ll think about this in 1.3

0reactions
evolrosscommented, Mar 23, 2018

Just for conversation purposes… one reason it would be useful to use Vent without redis-oplog is if you make use of a micro-service structure (which I do in my app).

So I may have a particular micro-service that needs to listen for Vent emissions but doesn’t need to use redis-oplog for pub-sub.

To make use of Vent now, I have to upgrade all my micro-services to redis-oplog - which is probably a good thing. But not all of them are overwhelmed by oplog-tailing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

sewenew/redis-plus-plus: Redis client written in C++ - GitHub
If you still want to build the redis-plus-plus with C++11, you can set the ... If the method returns false , it DOES...
Read more >
Redis Streams tutorial
A comprehensive tutorial on Redis streams.
Read more >
How to use redis PUBLISH/SUBSCRIBE with nodejs to notify ...
First you should(if you have not done this yet) install node.js+npm in 30 seconds (the right way because you should NOT run npm...
Read more >
Investigating timeout exceptions in StackExchange.Redis for ...
Steps to investigate: · Upgrade the cache to a larger size so that you are not running up against memory limitations on the...
Read more >
Redis Support - Spring
If true , the Redis List acts as a FIFO queue when used with a default Redis queue outbound channel adapter. Set it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found