Skip to content

Instantly share code, notes, and snippets.

View sidsamant's full-sized avatar

Sid Sam sidsamant

  • SS&C Technologies
  • India
View GitHub Profile
spring.cloud:
stream:
default:
consumer:
maxAttempts: 2
kafka:
default:
consumer:
useNativeDecoding: true
enableDlq: true
spring.kafka:
bootstrapServers: "my-kafka-node-url"
spring.cloud.stream:
kafka.bindings:
my-function.consumer.configuration:
key.deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserialzier
value.deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserialzier
spring.deserializer.key.delegate.class: org.apache.kafka.common.serialization.StringDeserializer
spring.deserializer.value.delegate.class: io.confluent.kafka.serializers.KafkaAvroDeserializer
@Bean
ListenerContainerWithDlqAndRetryCustomizer cust(KafkaTemplate<?, ?> template) {
return new ListenerContainerWithDlqAndRetryCustomizer() {
@Override
public void configure(AbstractMessageListenerContainer<?, ?> container, String destinationName,
String group,
@Nullable BiFunction<ConsumerRecord<?, ?>, Exception, TopicPartition> dlqDestinationResolver,
@Nullable BackOff backOff) {
@sidsamant
sidsamant / gist:9a098fd3d8fbb7bf40ed349e0efb95dd
Last active May 5, 2018 07:45
VM VirtualBox Host-Only Adapter, Static IP, Internet Access, Windows 10 Host, Fedora 26 Guest
Steps I followed to have my windows 10 host connect to Fedora 26 guest with static IP though host-only adapter and also allow the VM to connect to Internet through the host.
In VM VirtualBox,
1. File -> Preferences -> Network
NAT Networks tab
------------------
a. Hit the icon for 'Adds new NAT network'.
b. Wait till a new NAT Network adapter is created and added to the list. For me, it was named as 'NatNetwork'.