Hi,
Setup
RabbitMQ 4.1.1
3 node cluster
64 core AMD EPYC 7742, 2,25 GhZ
512 GB RAM
Data
154 stream queues with following config (identical for all)
(sample stream list sorted by number of messages)
x-max-age 172800s (2 days)
x-queue-type: stream
x-queue-leader-locator: least-leaders
durable: true
Message size: 28 byte
Stream sizes vary between a a few thousand messages "per day" and several billion per day.
Producers
1 producer per stream
latest java client
Consumers
3 consumer instances
each "consumer instance" consumes all 154 streams
one connection is used per stream
-> 154 x 3 = 462 connections for consumers (from consumer to rmq cluster)
Issue
The read performance is randomly inconsistent among all consumers.
In total, each consumer is capable of reading around 1.5 - 2 million messages per second.
However, this only applies for certain streams.
Example
A stream with 5.2 billion entries is consumed fine by consumer A and B but very slow on consumer C.
For another stream from the same setup, read performance is fine on consumer B and C but A is slow.
By observation, the read ratio for βslowβ streams falls down to 10.000 messages per second.
This was even worse, when we used one connection for each consumer instead of one connection for each stream.
We already tried different initialCredit sizes - no luck.
What we expect: read from all streams with full speed on any consumer
The consumers itself just put the read messages βin memoryβ - there is now slowdown on consumer end.
Go consumer setup code
env, err := stream.NewEnvironment(
stream.NewEnvironmentOptions().
SetMaxConsumersPerClient(1).
SetRPCTimeout(1 * time.Minute),
)
...
consumer, err := ha.NewReliableConsumer(env, streamName,
stream.NewConsumerOptions().
SetConsumerName(consumerName).Β
SetCRCCheck(false). Β Β Β Β Β Β
SetAutoCommit(stream.NewAutoCommitStrategy().
SetCountBeforeStorage(10000). Β Β Β
SetFlushInterval(10*time.Second)).Β
SetOffset(stream.OffsetSpecification{}.First()),
ts.HandleRMQMessage)
Is there any tuning we could try? Thanks for any help.
Should we try with "autoOffset" disabled?
Best Regards
Christian