Skip to content

Commit 89b6c2c

Browse files
jdemeyermilindl
andauthored
Move doc from InitTransactions to BeginTransaction (#1095)
Co-authored-by: Milind L <[email protected]>
1 parent 0640a54 commit 89b6c2c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

kafka/producer.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -807,14 +807,6 @@ func (p *Producer) SetOAuthBearerTokenFailure(errstr string) error {
807807
// will acquire the internal producer id and epoch, used in all future
808808
// transactional messages issued by this producer instance.
809809
//
810-
// Upon successful return from this function the application has to perform at
811-
// least one of the following operations within `transaction.timeout.ms` to
812-
// avoid timing out the transaction on the broker:
813-
// - `Produce()` (et.al)
814-
// - `SendOffsetsToTransaction()`
815-
// - `CommitTransaction()`
816-
// - `AbortTransaction()`
817-
//
818810
// Parameters:
819811
// - `ctx` - The maximum time to block, or nil for indefinite.
820812
// On timeout the operation may continue in the background,
@@ -846,6 +838,14 @@ func (p *Producer) InitTransactions(ctx context.Context) error {
846838
// `InitTransactions()` must have been called successfully (once)
847839
// before this function is called.
848840
//
841+
// Upon successful return from this function the application has to perform at
842+
// least one of the following operations within `transaction.timeout.ms` to
843+
// avoid timing out the transaction on the broker:
844+
// - `Produce()` (et.al)
845+
// - `SendOffsetsToTransaction()`
846+
// - `CommitTransaction()`
847+
// - `AbortTransaction()`
848+
//
849849
// Any messages produced, offsets sent (`SendOffsetsToTransaction()`),
850850
// etc, after the successful return of this function will be part of
851851
// the transaction and committed or aborted atomatically.

0 commit comments

Comments
 (0)