return new KafkaChatRoomFactory(chatMessageChannel);
}
- @Bean
- Producer<Integer, CreateChatRoomRequestTo> chatRoomChannelProducer(
- Properties defaultProducerProperties,
- ChatBackendProperties chatBackendProperties,
- IntegerSerializer integerSerializer,
- JsonSerializer<CreateChatRoomRequestTo> chatRoomSerializer)
- {
- Map<String, Object> properties = new HashMap<>();
- defaultProducerProperties.forEach((key, value) -> properties.put(key.toString(), value));
- properties.put(
- ProducerConfig.CLIENT_ID_CONFIG,
- chatBackendProperties.getKafka().getClientIdPrefix() + "_CHATROOM_CHANNEL_PRODUCER");
- return new KafkaProducer<>(
- properties,
- integerSerializer,
- chatRoomSerializer);
- }
-
@Bean
KafkaLikeShardingStrategy shardingStrategy(ChatBackendProperties properties)
{