Skip to content

Commit

Permalink
perf($RabbitMQ): make JSON message converter as default
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnymillergh committed Mar 9, 2021
1 parent 660bf49 commit 1b9bb6d
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
import lombok.extern.slf4j.Slf4j;
import lombok.val;
import org.springframework.amqp.core.TopicExchange;
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

Expand All @@ -26,4 +30,9 @@ TopicExchange topicExchange() {
log.info("Created topic exchange: {}", exchange);
return exchange;
}

@Bean
public MessageConverter messageConverter() {
return new Jackson2JsonMessageConverter();
}
}

0 comments on commit 1b9bb6d

Please sign in to comment.