Created
November 22, 2020 21:57
-
-
Save razorcd/f7c4ae52c741d5d1d6bd02c41fb7a664 to your computer and use it in GitHub Desktop.
Scaling reactive APIs - www.razorcodes.com
This file contains hidden or 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
@Repository | |
@RequiredArgsConstructor | |
public class CustomerRepository<E extends Identifiable> { | |
private final RedisTemplate<String,E> staticTemplate; | |
public void save(E event) { | |
staticTemplate.opsForStream().add(ObjectRecord.create(customer.getStringId(), event)); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment