Skip to content

Instantly share code, notes, and snippets.

View zlatozar's full-sized avatar
🇧🇬
Давай!

Zlatozar Zhelyazkov zlatozar

🇧🇬
Давай!
View GitHub Profile
@zlatozar
zlatozar / java_compile.sh
Created August 31, 2023 14:02
Build java maven project without having java installed
docker run -it --rm --name country-maven-project -v "$PWD":/usr/src/app -v "$HOME"/.m2:/root/.m2 -w /usr/src/app maven:3-eclipse-temurin-17 mvn clean package -DskipTests
@zlatozar
zlatozar / RetryFailed.java
Last active March 18, 2023 08:22
Organise Kafka retries to third party systems
public class RetryProcessor {
private final long schedulerIntervalMs = 60000;
private final String entityStoreName = "failed-message-store";
private KeyValueStore<String, Object> entityStore;
@Override
public void init(final ProcessorContext context) {
this.entityStore = (KeyValueStore) context().getStateStore(entityStoreName);
context().schedule(Duration.ofMillis(this.schedulerIntervalMs), PunctuationType.WALL_CLOCK_TIME,