Skip to content

Instantly share code, notes, and snippets.

@Service
@Slf4j
public class KeyValuePairServiceImpl implements KeyValuePairService {
private final KeyValuePairRepository keyValuePairRepository;
public KeyValuePairServiceImpl(KeyValuePairRepository keyValuePairRepository) {
this.keyValuePairRepository = keyValuePairRepository;
}
@Override
@EnableCaching
@Configuration
public class RedisConfig {
private final RedisSerializer<String> stringSerializer = RedisSerializer.string();
private final RedisSerializer<Object> objectRedisSerializer = RedisSerializer.json();
private final Duration ttl = Duration.ofHours(6);
## solution to problem 1
def is_palindrome(n):
if n < 0:
return False
s = str(n)
flag = 0
for c in s[:len(s)/2]:
@Ruhshan
Ruhshan / kafkacheatsheet.md
Last active May 1, 2024 02:54
Kafka cheeat sheet

List kafka topics

kafka-topics --bootstrap-server localhost:9092 --list

Delete kafka topic

kafka-topics --bootstrap-server localhost:9092 --delete --topic topic-message