A-Wanderer commented on a change in pull request #14604:
URL: https://github.com/apache/pulsar/pull/14604#discussion_r832515808
##########
File path: pulsar-client-cpp/lib/ConsumerImpl.cc
##########
@@ -1228,8 +1243,15 @@ void ConsumerImpl::seekAsync(const MessageId& msgId,
ResultCallback callback) {
uint64_t requestId = client->newRequestId();
LOG_DEBUG(getName() << " Sending seek Command for Consumer - " <<
getConsumerId() << ", requestId - "
<< requestId);
+ auto chunkMessageIdImpl =
std::dynamic_pointer_cast<ChunkMessageIdImpl>(msgId.impl_);
Future<Result, ResponseData> future =
- cnx->sendRequestWithId(Commands::newSeek(consumerId_, requestId,
msgId), requestId);
+ (chunkMessageIdImpl != nullptr)
+ ? cnx->sendRequestWithId(
+ Commands::newSeek(consumerId_, requestId,
+
chunkMessageIdImpl->getFirstChunkMessageIdImpl().ledgerId_,
+
chunkMessageIdImpl->getFirstChunkMessageIdImpl().entryId_),
+ requestId)
+ : cnx->sendRequestWithId(Commands::newSeek(consumerId_,
requestId, msgId), requestId);
Review comment:
I save the overload
`newSeek(uint64_t consumerId, uint64_t requestId, const MessageId&
messageId);`
add check impl in it, choose ledgerId and entryId then return.
So the `newSeek(uint64_t consumerId, uint64_t requestId, int64_t ledgerId,
int64_t entryId)` I will delete it.
--
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]