Skip to content

Instantly share code, notes, and snippets.

@sebastienblanc
Created November 17, 2022 09:17
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 sebastienblanc/777f38132b2e08167c891bd6ad34ccb3 to your computer and use it in GitHub Desktop.
Save sebastienblanc/777f38132b2e08167c891bd6ad34ccb3 to your computer and use it in GitHub Desktop.
@Incoming("product-in")
public Uni<Void> processProduct(Message<String> message) {
final Serde<Product> serde = DebeziumSerdes.payloadJson(Product.class);
serde.configure(Collections.singletonMap("from.field", "after"), false);
Product product = serde.deserializer().deserialize("product-in", message.getPayload().getBytes());
//Do complicated stuff with product
Log.info(product.getName());
return Uni.createFrom().nullItem();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment