forked from apache/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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 apache#23945
- Loading branch information
Ómar Kjartan Yasin
committed
Feb 7, 2025
1 parent
5e5d514
commit a5953b1
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: |