Comments (4)
Well, I don't really agree on this one.
The loop topic should be copartitioned. The rationale behind loopback is to let one key "communicate" with another, not to repartition a topic.
Let me give you the typical use case for loopback: There is an event saying A sent a message to B. We want a processor to keep a counter for how many messages a user sent and received. With that we can calculate ratios between both values and perhaps send alert messages. The group table would have values like this:
type value struct {
sent int
received int
}
The processor does the following, it consumes the "messages" topic, which has the sender A as key. Once it receives the message, it increments sent for the user and loopbacks the message to B (the id of B is inside the message). Once key B receives the message in the loopback callback, it increments B's received counter.
We have also scenarios where the message is looped back yet another time. We do some online collaborative filtering and there the flow is something like this:
- event arrives on A and A sends its model to B
- B updates its model with A's model and send its model to A
- A updates its model with B's.
When we need to do the repartition of a topic, we consume from an N-partitioned topic and emit into an M-partitioned topic and then consume that topic in another processor. Is that ok for your use case?
from goka.
@db7 I totally get what you mean and fully agree on that! But I was talking about lookup, not loopback :)
from goka.
@burdiyan Oh, I see... sorry for that :$
I fully agree on your point too, Lookup tables can have any number of partitions. And I see that the current implementation of processor does not allow that. This is definitely a bug.
from goka.
This should be fixed now.
from goka.
Related Issues (20)
- Link to blog post is dead HOT 1
- Processor calls wrong decode codec on message receipt HOT 1
- Any way allow to customize key of KTable HOT 1
- bug error setting up for partition HOT 3
- how to use Goka to move data from group table state to different storage system HOT 4
- EmitSync stuck in channel HOT 3
- Cannot connect to broker if the program is on docker container HOT 3
- Kafka server: Message was too large, server rejected it to avoid allocation error HOT 3
- How to modify value in Group table? HOT 4
- What storage I should use for processor and view? HOT 4
- How to fill up local cache with messages from a custom offset on start up? HOT 1
- Convert to using github.com/IBM/sarama HOT 1
- [question] Azure EventHub HOT 1
- no automatic reconnection processor ? HOT 1
- LevelDB - No space left on device HOT 1
- "panic: sync: negative WaitGroup counter" in PartitionProcessor.VisitValues HOT 8
- Behavior of View Sync HOT 1
- Configuring Sarama's initial offset to OffsetOldest leads the existing group to reprocess topic messages from start HOT 3
- Writing to group table from asynchronous function; using ctx.SetValue causes a WaitGroup panic
- Is there a way to get a list of the keys associated with a processor instance? 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 goka.