Comments (8)
@jdmorlan thanks, I really appreciate it.
This package has two concepts for communication.
- Kafka topic - There's a single kafka topic right now over which all the messages are sent. eg:
eog_ioptimize_prod_timeseries
- Pubsub channel - Even though all the messages are sent over kafka topic, this is useful if you want to subscribe to different things like:
pubsub.asyncIterator('user_updates')
orpubsub.asyncIterator('comments')
.
I see you have pubsub.asyncIterator('eog_ioptimize_prod_timeseries')
which makes me believe you might be confusing kafka topic with pubsub channel.
Now, for the odd part, to actually publish something on the pubsub channel, need something like:
pubsub.publish({
channel: 'user_updates',
...payloadThatYouWantToSend
})
I know it's weird to mix the channel with the actual message payload and I will fix it soon.
Let me know if this fixes your issue.
from graphql-kafka-subscriptions.
I'll work on getting the example implementation in place tomorrow.
from graphql-kafka-subscriptions.
I'm still a little hazy...gonna have to buy you a beer or coffee! Here is a little overview of our situation, maybe it will help in being able to say our use case is a good fit or not.
We have a service that is collecting data from a bunch of sources and producing messages that go into Kafka. I noticed that the publish method instructs the producer to write a message to Kafka, but in our situation, we only need to read as new messages come into Kafka.
The GraphQL service has no say in producing data...only acts as a reader. Is it a requirement that we publish (write to Kafka) to enable getting messages back from Kafka?
from graphql-kafka-subscriptions.
Understood,
you just want to subscribe to all the messages coming over the kafka topic.
I think I need to make a few tweaks to support this use case.
I'll get back to you with something asap.
from graphql-kafka-subscriptions.
@jdmorlan I have released version 0.2.1
Now it should also work by subscribing over the whole topic (like you do now) or by using channels like I mentioned above.
Make sure you update your dependency and let me know if it's good for you.
Thanks
from graphql-kafka-subscriptions.
That did the trick...thanks so much for your quick responses and help.
from graphql-kafka-subscriptions.
Awesome.
Closing the issue.
from graphql-kafka-subscriptions.
Has the problem with not supporting the correct publish
interface of PubSubEngine
ever be resolved? PubSubEngine
defines it as:
abstract publish(triggerName: string, payload: any): Promise<void>;
but this implementation overloads it to:
abstract publish(payload: any): Promise<void>;
So it does not implement the interface properly and cannot be used as drop-in replacement without changing all the code.
from graphql-kafka-subscriptions.
Related Issues (20)
- Stable HOT 2
- Webpack Incompatible HOT 1
- Published versions of this package don't seem to include the latest changes HOT 9
- update graphql-subscriptions to the latest version 🚀 HOT 1
- kafka broker with acl auth?
- SASL support HOT 2
- Does not work after a few messages. HOT 4
- Example resolver HOT 3
- "Error: No provider for SASL mechanism GSSAPI" on Centos / Host resolution Error
- Consumer stops consuming after a while [kafka-pubsub] HOT 1
- Nothing coming back from asyncIterator HOT 1
- Individual consumer groupIds HOT 6
- Installation error on macOS Catalina 10.15.7 HOT 1
- Logger expects bunyan HOT 2
- Subscriptions stop firing when running in a docker container. HOT 2
- Only supports for multiple brokers HOT 2
- Channel should not be a requirement HOT 1
- Initializing the Kafka topic for first execute HOT 1
- Duplicated subscription responses
- Question: Subscription Durability HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphql-kafka-subscriptions.