Alienero opened a new issue, #1284:
URL: https://github.com/apache/rocketmq-clients/issues/1284

   ### Programming Language of the Client
   
   Go
   
   ### Is Your Feature Request Related to a Problem?
   
   The Go LitePushConsumer currently supports subscribing to lite topics, but 
it does not provide a way to specify the starting offset when calling 
`SubscribeLite`.
   
   Java clients already support this capability through `OffsetOption`, 
allowing users to subscribe from a specific offset, tail N messages, timestamp, 
or predefined policies such as last/min/max offset. Without the same support in 
Go, users cannot control where lite topic consumption starts, which makes it 
difficult to replay messages, skip existing messages, or resume from a known 
lite topic offset.
   
   ### Describe the Solution You'd Like
   
   Add offset option support for Go lite topic subscriptions, aligned with the 
Java client API and protobuf protocol.
   
   The Go client should provide an `OffsetOption` type with support for:
   
   - `LastOffset`
   - `MinOffset`
   - `MaxOffset`
   - `NewOffsetOptionWithOffset(offset int64)`
   - `NewOffsetOptionWithTailN(tailN int64)`
   - `NewOffsetOptionWithTimestamp(timestamp int64)`
   
   `LitePushConsumer.SubscribeLite` should accept an optional offset option and 
send it through `SyncLiteSubscriptionRequest.offset_option`.
   
   The offset behavior should follow the existing protocol semantics used by 
Java:
   
   - Explicit offset is zero-based and inclusive.
   - For example, setting offset to `3` starts consuming from the message whose 
lite offset is `3`, i.e. the fourth message if offsets are `0, 1, 2, 3`.
   - `LastOffset` maps to `Policy.LAST`, consistent with Java.
   - `MaxOffset` maps to `Policy.MAX` and can be used to skip existing messages.
   
   ### Describe Alternatives You've Considered
   
   Users could manually track offsets outside the client, but without 
client-side support for sending `offset_option` in lite subscription requests, 
the server cannot start consumption from the desired lite topic offset.
   
   ### Additional Context
   
   _No response_


-- 
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