RobertIndie commented on code in PR #1039:
URL: https://github.com/apache/pulsar-client-go/pull/1039#discussion_r1247832015


##########
pulsar/producer_partition.go:
##########
@@ -805,35 +807,29 @@ func (p *partitionProducer) internalSingleSend(mm 
*pb.MessageMetadata,
        }
 
        sid := *mm.SequenceId
-       var err error
+       var useTxn bool
+       var mostSigBits uint64
+       var leastSigBits uint64
+
        if request.transaction != nil {
                txnID := request.transaction.GetTxnID()
-               err = internal.SingleSend(
-                       buffer,
-                       p.producerID,
-                       sid,
-                       mm,
-                       payloadBuf,
-                       p.encryptor,
-                       maxMessageSize,
-                       true,
-                       txnID.MostSigBits,
-                       txnID.LeastSigBits,
-               )
-       } else {
-               err = internal.SingleSend(
-                       buffer,
-                       p.producerID,
-                       sid,
-                       mm,
-                       payloadBuf,
-                       p.encryptor,
-                       maxMessageSize,
-                       false,
-                       0,
-                       0,
-               )
-       }
+               mostSigBits = txnID.MostSigBits

Review Comment:
   Need to set useTxn to true here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to