`messageBuffer` support
See original GitHub issueHi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch graphql-redis-subscriptions@2.3.1
for the project I’m working on.
Here is the diff that solved my problem:
diff --git a/node_modules/graphql-redis-subscriptions/dist/redis-pubsub.d.ts b/node_modules/graphql-redis-subscriptions/dist/redis-pubsub.d.ts
index bad3e89..d5a916c 100644
--- a/node_modules/graphql-redis-subscriptions/dist/redis-pubsub.d.ts
+++ b/node_modules/graphql-redis-subscriptions/dist/redis-pubsub.d.ts
@@ -37,5 +37,5 @@ export declare type Trigger = string | Path;
export declare type TriggerTransform = (trigger: Trigger, channelOptions?: unknown) => string;
export declare type Reviver = (key: any, value: any) => any;
export declare type Serializer = (source: any) => string;
-export declare type Deserializer = (source: string) => any;
+export declare type Deserializer = (source: any) => any;
export {};
diff --git a/node_modules/graphql-redis-subscriptions/dist/redis-pubsub.js b/node_modules/graphql-redis-subscriptions/dist/redis-pubsub.js
index 443893a..6ea54fa 100644
--- a/node_modules/graphql-redis-subscriptions/dist/redis-pubsub.js
+++ b/node_modules/graphql-redis-subscriptions/dist/redis-pubsub.js
@@ -82,8 +82,8 @@ var RedisPubSub = (function () {
console.error("No publisher or subscriber instances were provided and the package 'ioredis' wasn't found. Couldn't create Redis clients.");
}
}
- this.redisSubscriber.on('pmessage', this.onMessage.bind(this));
- this.redisSubscriber.on('message', this.onMessage.bind(this, undefined));
+ this.redisSubscriber.on('pmessageBuffer', this.onMessage.bind(this));
+ this.redisSubscriber.on('messageBuffer', this.onMessage.bind(this, undefined));
this.subscriptionMap = {};
this.subsRefsMap = {};
this.currentSubscriptionId = 0;
This issue body was partially generated by patch-package.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5 (4 by maintainers)
Top Results From Across the Web
FreeRTOS message buffers - circular buffers
Message buffers allow variable length discrete messages to be passed from an interrupt service routine to a task, or from one task to...
Read more >MessageBuffer Class (System.ServiceModel.Channels)
Implements methods that can be used to extend run-time behavior for an endpoint in either a service or client application. Message.CreateMessage Method (System....
Read more >log4cxx::helpers::MessageBuffer Class Reference
This class is used by the LOG4CXX_INFO and similar macros to support insertion operators in the message parameter. More... #include <messagebuffer.h>. Public ...
Read more >Tuning the maximum message buffer space - IBM
XCF acquires message buffers on an as needed basis, that is, XCF acquires only those buffers needed to support the current message traffic...
Read more >OracleAS Adapter for Tuxedo Message Buffer Support
OracleAS Adapter for Tuxedo Message Buffer Support · STRING : A null terminated character array. · CARRAY : An array of un-interpreted arbitrary...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m not a maintainer, but I gave it a shot here: https://github.com/davidyaha/graphql-redis-subscriptions/pull/360
Selfishly just trying to breath a little life back into this project, so I can get some feedback on my issue too. https://github.com/davidyaha/graphql-redis-subscriptions/issues/359
Cheers, @AlaaZorkane hope this can get accepted.
This definitely works, but I think it breaks backwards compatibility. Maybe an option(s) in the constructor to select “buffer mode” or not.
But that’s a little verbose, maybe: