Java Code Examples for org.springframework.data.redis.listener.adapter.MessageListenerAdapter#setSerializer()

The following examples show how to use org.springframework.data.redis.listener.adapter.MessageListenerAdapter#setSerializer() . 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: RedisConfiguration.java    From ddd-strategic-design-spring-boot with Apache License 2.0 4 votes vote down vote up
@Bean
MessageListenerAdapter creditApplicationApprovedMessageListener(CreditApplicationApprovedEventReceiver receiver) {
    MessageListenerAdapter messageListenerAdapter = new MessageListenerAdapter(receiver, "receiveMessage");
    messageListenerAdapter.setSerializer(new Jackson2JsonRedisSerializer<CreditApplicationApprovedEvent>(CreditApplicationApprovedEvent.class));
    return messageListenerAdapter;
}
 
Example 2
Source File: RedisConfiguration.java    From ddd-strategic-design-spring-boot with Apache License 2.0 4 votes vote down vote up
@Bean
MessageListenerAdapter creditApplicationDeclinedMessageListener(CreditApplicationDeclinedEventReceiver receiver) {
    MessageListenerAdapter messageListenerAdapter = new MessageListenerAdapter(receiver, "receiveMessage");
    messageListenerAdapter.setSerializer(new Jackson2JsonRedisSerializer<CreditApplicationDeclinedEvent>(CreditApplicationDeclinedEvent.class));
    return messageListenerAdapter;
}
 
Example 3
Source File: RedisConfiguration.java    From ddd-strategic-design-spring-boot with Apache License 2.0 4 votes vote down vote up
@Bean
MessageListenerAdapter customerCreatedMessageListener(CustomerCreatedEventReceiver receiver) {
    MessageListenerAdapter messageListenerAdapter = new MessageListenerAdapter(receiver, "receiveMessage");
    messageListenerAdapter.setSerializer(new Jackson2JsonRedisSerializer<CustomerCreatedEvent>(CustomerCreatedEvent.class));
    return messageListenerAdapter;
}