kafka-topics --bootstrap-server localhost:9092 --list
kafka-topics --bootstrap-server localhost:9092 --delete --topic topic-message
@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]: |