You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have set ConsumeFromLastOffset (a new consumption group) when I use Rocketmq consumer to consume, but I still consume the old data after starting. I have seen the code in it. The first time I obtained the offset, it was 0. But I think Rocketmq go sdk needs - 1 to obtain the maximum offset. Do you encounter this situation and how to solve it
I have set ConsumeFromLastOffset (a new consumption group) when I use Rocketmq consumer to consume, but I still consume the old data after starting. I have seen the code in it. The first time I obtained the offset, it was 0. But I think Rocketmq go sdk needs - 1 to obtain the maximum offset. Do you encounter this situation and how to solve it
c, err := rocketmq.NewPushConsumer(
consumer.WithCredentials(credential),
consumer.WithNameServer([]string{endpoint}),
consumer.WithNamespace(instanceID),
consumer.WithGroupName(groupId),
consumer.WithInstance(getInstanceName(topic)),
consumer.WithAutoCommit(true),
consumer.WithConsumerModel(consumer.Clustering),
consumer.WithConsumeFromWhere(consumer.ConsumeFromLastOffset),
consumer.WithConsumeMessageBatchMaxSize(1),
consumer.WithTrace(&primitive.TraceConfig{
//TraceTopic: topic,
GroupName: groupId,
Access: primitive.Cloud,
NamesrvAddrs: []string{endpoint},
Credentials: credential,
Resolver: primitive.NewPassthroughResolver([]string{endpoint}),
}),
)
The text was updated successfully, but these errors were encountered: