makes subscription start from MessageId.latest defaultly - #9444
Conversation
sijie
left a comment
There was a problem hiding this comment.
@aloyszhang the change looks good. Can you add a test case?
There was a problem hiding this comment.
Hi @aloyszhang, I think the root cause is that we haven't handled the messageId correctly. I left a comment here #9441 (comment).
|
@zymap Yes, you're right, I'll check this later and add some test code. |
|
@zymap So far, I didn't find a way to handle a Do you have any idea about this? |
|
Since this PR does not resolve issue #9441, so remove the |
|
/pulsarbot run-failure-checks |
|
@aloyszhang I think there has an easier way is add query params at this API and allow it to pass a message position string. If the user only specifies the message position with a string in the query params, we can use it to create a cursor. Otherwise, we can use the current logic to handle it. For example, if a request URL likes this: We can create a subscription from the latest position if a request URL likes this: We can use current logic to handle it. |
|
@zymap Thanks for your suggestions.
Only one thing need to be figured out, if the request have boths |
|
/pulsarbot run-failure-checks |
|
@zymap Can you review it again? |
### Motivation Currently , if we did not specify the position when create a new subscription, it's will use the earliest position defaulty. https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java#L2002 This PR makes subscription start from MessageId.latest defaultly (cherry picked from commit 28b2094)
Motivation
Currently , if we did not specify the position when create a new subscription, it's will use the earliest position defaulty. https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java#L2002
This PR makes subscription start from MessageId.latest defaultly