org.springframework.kafka.support.converter.StringJsonMessageConverter Java Examples

The following examples show how to use org.springframework.kafka.support.converter.StringJsonMessageConverter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CommonConfiguration.java    From grussell-spring-kafka with Apache License 2.0 5 votes vote down vote up
@Bean
public ConcurrentKafkaListenerContainerFactory<String, String> jsonKafkaListenerContainerFactory() {
	ConcurrentKafkaListenerContainerFactory<String, String> factory =
			new ConcurrentKafkaListenerContainerFactory<>();
	factory.setConsumerFactory(consumerFactory());
	factory.setMessageConverter(new StringJsonMessageConverter());
	return factory;
}
 
Example #2
Source File: SenderConfig.java    From spring-kafka with MIT License 5 votes vote down vote up
@Bean
public KafkaTemplate<String, String> kafkaTemplate() {
  KafkaTemplate<String, String> template = new KafkaTemplate<>(producerFactory());
  template.setMessageConverter(new StringJsonMessageConverter());

  return template;
}
 
Example #3
Source File: ReceiverConfig.java    From spring-kafka with MIT License 5 votes vote down vote up
@Bean
public ConcurrentKafkaListenerContainerFactory<String, String> kafkaListenerContainerFactory() {
  ConcurrentKafkaListenerContainerFactory<String, String> factory =
      new ConcurrentKafkaListenerContainerFactory<>();
  factory.setConsumerFactory(consumerFactory());
  factory.setMessageConverter(new StringJsonMessageConverter());

  return factory;
}
 
Example #4
Source File: DunwuKafkaConfig.java    From spring-boot-tutorial with Creative Commons Attribution Share Alike 4.0 International 4 votes vote down vote up
@Bean
public RecordMessageConverter converter() {
    return new StringJsonMessageConverter();
}
 
Example #5
Source File: LocKafkaAutoConfiguration.java    From loc-framework with MIT License 4 votes vote down vote up
@Bean
@ConditionalOnMissingBean
public RecordMessageConverter recordMessageConverter() {
  return new StringJsonMessageConverter(objectMapper);
}
 
Example #6
Source File: Application.java    From spring-cloud-contract-samples with Apache License 2.0 4 votes vote down vote up
@Bean
public RecordMessageConverter converter() {
	return new StringJsonMessageConverter();
}
 
Example #7
Source File: Application.java    From spring-cloud-contract-samples with Apache License 2.0 4 votes vote down vote up
@Bean
public RecordMessageConverter converter() {
	return new StringJsonMessageConverter();
}