Skip to content

Commit 36da9d7

Browse files
Omar YasinÓmar Kjartan Yasinlhotari
authored andcommitted
[improve][pip] PIP-407 Add a newMessage API to create a message with a schema and transaction (apache#23950)
Co-authored-by: Ómar Kjartan Yasin <[email protected]> Co-authored-by: Lari Hotari <[email protected]>
1 parent bcda1c5 commit 36da9d7

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

pip/pip-407.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# PIP-407: Add a newMessage API to create a message with a schema and transaction
2+
3+
# Background knowledge
4+
5+
Pulsar allows messages to be produced with a schema and with a transaction. The producer API allows for messages to
6+
be created with a schema or with a transaction.
7+
8+
# Motivation
9+
10+
The producer API does not expose a method to publish a message with a schema and transaction. This is a gap in the
11+
public API that can be addressed by adding a new overload that creates a message with a schema and a transaction.
12+
13+
# Goals
14+
15+
Make it possible to produce a message that has a custom schema within a transaction.
16+
17+
## In Scope
18+
19+
Add a new method to the Producer public API, and corresponding implementation, that allows for messages to be created
20+
with a custom schema and a transaction.
21+
22+
## Public-facing Changes
23+
24+
Add a new method to Producer to create a Message that accepts a schema and transaction
25+
26+
### Public API
27+
28+
#### Producer.java
29+
30+
```java
31+
<V> TypedMessageBuilder<V> newMessage(Schema<V> schema,
32+
Transaction txn);
33+
```
34+
35+
# Backward & Forward Compatibility
36+
37+
Fully compatible.
38+
39+
# Links
40+
41+
* Mailing List discussion thread: https://lists.apache.org/thread/f8n0fbjj67cpzprxd8qp582ncy7hwtdn
42+
* Mailing List voting thread: https://lists.apache.org/thread/15xmf3qb5r252cvmhp5lbyo62bktpwfj

0 commit comments

Comments
 (0)