This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 689c16a359a [improve][pip] PIP-407 Add a newMessage API to create a
message with a schema and transaction (#23950)
689c16a359a is described below
commit 689c16a359a4c73056f416e6ba1fb297ee472343
Author: Omar Yasin <[email protected]>
AuthorDate: Fri Feb 28 01:17:00 2025 -0800
[improve][pip] PIP-407 Add a newMessage API to create a message with a
schema and transaction (#23950)
Co-authored-by: Ómar Kjartan Yasin <[email protected]>
Co-authored-by: Lari Hotari <[email protected]>
---
pip/pip-407.md | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/pip/pip-407.md b/pip/pip-407.md
new file mode 100644
index 00000000000..e4a421144bb
--- /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
+ <V> TypedMessageBuilder<V> newMessage(Schema<V> schema,
+ Transaction txn);
+```
+
+# Backward & Forward Compatibility
+
+Fully compatible.
+
+# Links
+
+* Mailing List discussion thread:
https://lists.apache.org/thread/f8n0fbjj67cpzprxd8qp582ncy7hwtdn
+* Mailing List voting thread:
https://lists.apache.org/thread/15xmf3qb5r252cvmhp5lbyo62bktpwfj