merlimat commented on a change in pull request #586:
URL: https://github.com/apache/pulsar-client-go/pull/586#discussion_r685695372



##########
File path: pulsar/retry_router.go
##########
@@ -87,10 +87,15 @@ func (r *retryRouter) run() {
                        producer := r.getProducer()
 
                        msgID := rm.consumerMsg.ID()
-                       producer.SendAsync(context.Background(), 
&rm.producerMsg, func(MessageID, *ProducerMessage, error) {
-                               // TODO: if router produce failed, should Nack 
this message
-                               r.log.WithField("msgID", msgID).Debug("Sent 
message to RLQ")
-                               rm.consumerMsg.Consumer.AckID(msgID)
+                       producer.SendAsync(context.Background(), 
&rm.producerMsg, func(messageID MessageID,
+                               producerMessage *ProducerMessage, err error) {
+                               if err != nil {
+                                       r.log.WithField("msgID", 
msgID).Errorf("Sent message to RLQ,error=%v", err)

Review comment:
       We should preferably use `WithError(err)` in the logger, to retain the 
structured form




-- 
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: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to