This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring.kafka: | |
bootstrapServers: "my-kafka-node-url" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring.cloud: | |
stream: | |
default: | |
consumer: | |
maxAttempts: 2 | |
kafka: | |
default: | |
consumer: | |
useNativeDecoding: true | |
enableDlq: true |