Comments (7)
@viktorjucas Yes, note that ProcessorContex#schedule
returns a Cancellable
event. You can cancel it even within the punctuate call. For example:
Cancellable scheduled;
scheduled = context.schedule(... timestamp -> scheduled.cancel);
from kafka-streams-examples.
I have tried that and it doesn't seem to be cancelling.
public class Transformer implements Transformer<> {
private ProcessorContext context;
private Cancellable scheduled;
@Override
public void init(PorcessorContext processContext) {
this.context = processorContext;
scheduled = context.schedule(TimeUnit.SECONDS.toMillis(5), PunctuationType.WALL_CLOCK_TIME,
this::punctuateCancel);
}
private void punctuateCancel(long timestamp) {
scheduled.cancel();
}
}
from kafka-streams-examples.
Which version are you using? Note that this functionality is fixed in 1.1.1: https://issues.apache.org/jira/browse/KAFKA-6748
from kafka-streams-examples.
That's the reason. I was using 1.1.0.
from kafka-streams-examples.
Closed prematurely.
Is v1.1.1 available through Maven already?
from kafka-streams-examples.
No it is not released out yet: https://mvnrepository.com/artifact/org.apache.kafka/kafka-streams
If you have to cancel the even within the punctuate call, you can consider backporting that fix into your source code build.
from kafka-streams-examples.
@viktorjucas Kafka 1.1.1 is released now. Can you try it out and verify the fix so we can close this issue?
from kafka-streams-examples.
Related Issues (20)
- DeduplicationTransformer example only supports 1 partition HOT 2
- [BUG] microservices-orders: unknown command "READ" for "ccloud kafka acl create" HOT 3
- how to Packaging and running the Application Examples HOT 1
- GlobalKTablesAndStoresExampleDriver hangs with GlobalKTablesExample HOT 5
- How to create Kafka Server with org.apache.kafka:kafka_2.13:test:2.7.1 HOT 1
- Naming when adding global store HOT 4
- Do we have example on Kafka Stream Processor API to handle Smart routing case HOT 1
- ditch awaits in docker compose file
- Gitpodify so people can easily run the examples with 0 setup
- Do we have example to handle processor exception.
- Join operation is not working after update to 1.2.0 HOT 1
- Is The class of DeserializationExceptionHandler support construct with parameters HOT 1
- Consistency between inventory KTable/Topic and state store "reservedStock" for "shipped" event HOT 1
- Regarding Sum example HOT 1
- Can't find the package io.confluent.examples.streams.avro in src folder HOT 1
- How to suppress window using wall clock time instead of event time in Kafka streams? HOT 1
- Can't load library when running AnomalyDetectionLambdaExample HOT 2
- Case: 100+ KafkaStreams threads on 3.5k+ topics/partitions with exactly_once_v2 guarantee HOT 8
- Event driven order
- Kafka Streams ERROR Could not parse Avro schema
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 kafka-streams-examples.