cserwen commented on issue #1135:
URL:
https://github.com/apache/rocketmq-client-go/issues/1135#issuecomment-2033836761
> ` func OrderPersistListDealing(_accountType string, _b string, _q string)
{ err := rocketmq.RMQ().Consumer(rocketmq.ConsumerGroupPersist).Subscribe(
rocketmq.GetTopicPersist(_b, _q), consumer.MessageSelector{Type: consumer.TAG,
Expression: util.FormatSymbol(_b, _q)}, func(ctx context.Context, msgs
...*primitive.MessageExt) (consumer.ConsumeResult, error) { wg :=
&sync.WaitGroup{} bulkInsertESOrder(orders, wg, &esErr) }) }` Inside the
bulkInsertESOrder function, print logs after sleep 5 seconds. The result is
that every 5 seconds, 8 logs will be printed at the same time.
>
> The scenario is an application process that starts multiple
goroutine(OrderPersistListDealing is started multiple goroutine with different
_b and _q), with each goroutine using the same consumer to subscribe multiple
topics, and use MessageSelector to distinguish different data.
Cosume orderly ? Can you show the init code of rmq-consumer?
--
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]