You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "YoungCoderboy (via GitHub)" <gi...@apache.org> on 2025/07/25 09:23:07 UTC

[PR] [Issue 1399] add eventTime in reconsumeLaterWithCustomProperties func [pulsar-client-go]

YoungCoderboy opened a new pull request, #1400:
URL: https://github.com/apache/pulsar-client-go/pull/1400

   
   *(If this PR fixes a github issue, please add `Fixes #<xyz>`.)*
   
   Fixes #1399 
   
   *(or if this PR is one task of a github issue, please add `Master Issue: #<xyz>` to link to the master issue.)*
   
   Master Issue: #1399
   
   ### Motivation
   
   `ReconsumeLater` doesn't addeds the eventTime in new Rebuilded Message before pushing to Retry or Dlq topic 
   
   ### Modifications
   ```go
   // line 639 (consumer_impl.go)
           consumerMsg := ConsumerMessage{
   		Consumer: c,
   		Message: &message{
   			payLoad:    msg.Payload(),
   			properties: props,
   			msgID:      msgID,
   			eventTime:  msg.EventTime(), //<-- eventTime is added
   		},
   	}
   	if uint32(reconsumeTimes) > c.dlq.policy.MaxDeliveries {
   		c.dlq.Chan() <- consumerMsg
   	} else {
   		c.rlq.Chan() <- RetryMessage{
   			consumerMsg: consumerMsg,
   			producerMsg: ProducerMessage{
   				Payload:      msg.Payload(),
   				Key:          msg.Key(),
   				OrderingKey:  msg.OrderingKey(),
   				Properties:   props,
   				DeliverAfter: delay,
   				EventTime:    msg.EventTime(), //<--eventTime is added
   			},
   		}
   	}
   ```
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API: (no)
     - The schema: (no)
     - The default values of configurations: (no)
     - The wire protocol: (no)
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (no)
     - If yes, how is the feature documented? (not applicable / docs / GoDocs / not documented)
     - If a feature is not applicable for documentation, explain why?
     - If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
   


-- 
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-unsubscribe@pulsar.apache.org

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


Re: [PR] [Issue 1399] add eventTime in reconsumeLaterWithCustomProperties func [pulsar-client-go]

Posted by "YoungCoderboy (via GitHub)" <gi...@apache.org>.
YoungCoderboy commented on PR #1400:
URL: https://github.com/apache/pulsar-client-go/pull/1400#issuecomment-3126818999

   @RobertIndie I have added the test case as requested :)


-- 
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-unsubscribe@pulsar.apache.org

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


Re: [PR] [Issue 1399] add eventTime in reconsumeLaterWithCustomProperties func [pulsar-client-go]

Posted by "RobertIndie (via GitHub)" <gi...@apache.org>.
RobertIndie commented on code in PR #1400:
URL: https://github.com/apache/pulsar-client-go/pull/1400#discussion_r2235609440


##########
pulsar/consumer_impl.go:
##########
@@ -642,6 +642,7 @@ func (c *consumer) ReconsumeLaterWithCustomProperties(msg Message, customPropert
 			payLoad:    msg.Payload(),
 			properties: props,
 			msgID:      msgID,
+			eventTime:  msg.EventTime(),

Review Comment:
   Seems we don't need to set the eventTime 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: commits-unsubscribe@pulsar.apache.org

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


Re: [PR] [Issue 1399] add eventTime in reconsumeLaterWithCustomProperties func [pulsar-client-go]

Posted by "YoungCoderboy (via GitHub)" <gi...@apache.org>.
YoungCoderboy commented on PR #1400:
URL: https://github.com/apache/pulsar-client-go/pull/1400#issuecomment-3131846348

   @RobertIndie Made the Fix 


-- 
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-unsubscribe@pulsar.apache.org

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


Re: [PR] [Issue 1399] add eventTime in reconsumeLaterWithCustomProperties func [pulsar-client-go]

Posted by "RobertIndie (via GitHub)" <gi...@apache.org>.
RobertIndie commented on PR #1400:
URL: https://github.com/apache/pulsar-client-go/pull/1400#issuecomment-3130969927

   There is an lint issue. Could you help fix it? https://github.com/apache/pulsar-client-go/actions/runs/16568065485/job/46911067127?pr=1400#step:5:28 @YoungCoderboy 


-- 
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-unsubscribe@pulsar.apache.org

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


Re: [PR] [Issue 1399] add eventTime in reconsumeLaterWithCustomProperties func [pulsar-client-go]

Posted by "RobertIndie (via GitHub)" <gi...@apache.org>.
RobertIndie commented on code in PR #1400:
URL: https://github.com/apache/pulsar-client-go/pull/1400#discussion_r2235609440


##########
pulsar/consumer_impl.go:
##########
@@ -642,6 +642,7 @@ func (c *consumer) ReconsumeLaterWithCustomProperties(msg Message, customPropert
 			payLoad:    msg.Payload(),
 			properties: props,
 			msgID:      msgID,
+			eventTime:  msg.EventTime(),

Review Comment:
   Seems we don't need to set the eventTime 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: commits-unsubscribe@pulsar.apache.org

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


Re: [PR] [Issue 1399] add eventTime in reconsumeLaterWithCustomProperties func [pulsar-client-go]

Posted by "RobertIndie (via GitHub)" <gi...@apache.org>.
RobertIndie merged PR #1400:
URL: https://github.com/apache/pulsar-client-go/pull/1400


-- 
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-unsubscribe@pulsar.apache.org

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