Skip to content

Instantly share code, notes, and snippets.

@razorcd
Created November 22, 2020 21:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save razorcd/f7c4ae52c741d5d1d6bd02c41fb7a664 to your computer and use it in GitHub Desktop.
Save razorcd/f7c4ae52c741d5d1d6bd02c41fb7a664 to your computer and use it in GitHub Desktop.
Scaling reactive APIs - www.razorcodes.com
@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