From a5953b16729b703eb5682c37cb42c1061b8f480b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93mar=20Kjartan=20Yasin?= Date: Fri, 7 Feb 2025 09:09:29 -0800 Subject: [PATCH 1/2] [improve][pip] PIP-407 Add a newMessage API to create a message with a schema and transaction Discussion email: Implementation PR: [improve][pip] PIP-406: Introduce pulsar_subscription_dispatch_throttled_msgs and bytes metrics #23945 --- pip/pip-407.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 pip/pip-407.md diff --git a/pip/pip-407.md b/pip/pip-407.md new file mode 100644 index 0000000000000..fe2496693ea36 --- /dev/null +++ b/pip/pip-407.md @@ -0,0 +1,42 @@ +# PIP-407: Add a newMessage API to create a message with a schema and transaction + +# Background knowledge + +Pulsar allows messages to be produced with a schema and with a transaction. The producer API allows for messages to +be created with a schema or with a transaction. + +# Motivation + +The producer API does not expose a method to publish a message with a schema and transaction. This is a gap in the +public API that can be addressed by adding a new overload that creates a message with a schema and a transaction. + +# Goals + +Make it possible to produce a message that has a custom schema within a transaction. + +## In Scope + +Add a new method to the Producer public API, and corresponding implementation, that allows for messages to be created +with a custom schema and a transaction. + +## Public-facing Changes + +Add a new method to Producer to create a Message that accepts a schema and transaction + +### Public API + +#### Producer.java + +```java + TypedMessageBuilder newMessage(Schema schema, + Transaction txn); +``` + +# Backward & Forward Compatibility + +Fully compatible. + +# Links + +* Mailing List discussion thread: https://lists.apache.org/thread/f8n0fbjj67cpzprxd8qp582ncy7hwtdn +* Mailing List voting thread: From a66ee8b09c550961b838dbd8d0c85c66f431164f Mon Sep 17 00:00:00 2001 From: Lari Hotari Date: Fri, 28 Feb 2025 11:13:20 +0200 Subject: [PATCH 2/2] Add vote thread link --- pip/pip-407.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pip/pip-407.md b/pip/pip-407.md index fe2496693ea36..e4a421144bb09 100644 --- a/pip/pip-407.md +++ b/pip/pip-407.md @@ -39,4 +39,4 @@ Fully compatible. # Links * Mailing List discussion thread: https://lists.apache.org/thread/f8n0fbjj67cpzprxd8qp582ncy7hwtdn -* Mailing List voting thread: +* Mailing List voting thread: https://lists.apache.org/thread/15xmf3qb5r252cvmhp5lbyo62bktpwfj