Skip to content

Instantly share code, notes, and snippets.

View Yahampath's full-sized avatar
🏠
Working from home

Yahampath Yahampath

🏠
Working from home
  • MyBudget
  • Sri Lanka
  • 16:54 (UTC +05:30)
View GitHub Profile
@hassansin
hassansin / request-response.go
Last active January 20, 2025 07:26
Request-response pattern over asynchronous protocol using Go channel
package main
import (
"errors"
"fmt"
"math/rand"
"net/http"
"sync"
"time"
@yaroncon
yaroncon / KafkaConsumer.java
Last active June 12, 2020 08:03
Kafka consumer with Avro
import kafka.consumer.ConsumerConfig;
import kafka.consumer.ConsumerIterator;
import kafka.consumer.KafkaStream;
import kafka.javaapi.consumer.ConsumerConnector;
import kafka.message.MessageAndMetadata;
import org.apache.avro.Schema;
import org.apache.avro.generic.GenericDatumReader;
import org.apache.avro.generic.GenericRecord;
import org.apache.avro.io.Decoder;
import org.apache.avro.io.DecoderFactory;