menu

arrow_back Where can rabbitmq drawdowns come from?

by
4 votes
Hello everyone and happy holidays!

I have a queue in rabbitmq, the data from which is taken by clickhaus, no problems with it, but there are some strange drawdowns on the arrival of messages in the queue, which occur every 2 minutes steadily. What could be the problem? The messages are definitely not pausing as much as they appear on the graph

61cd4d9576aca046015874.jpeg

6 Comments

You have to look at the publisher's code, judging by the graphics.
Roman Mirr Here is the code, the endpoint in the symphony, the data comes into it and from there goes into the rabbitmq queue

$connection = new AMQPStreamConnection(
$_ENV['RABBIT_IP'],
$_ENV['RABBIT_PORT'],
$_ENV['RABBIT_USER'],
$_ENV['RABBIT_PASSWORD'],
'/',
false,
'AMQPLAIN',
null,
'en_US',
30, //Connection Timeout
30, // Read/Write Timeout
null,
false,
60
);
$channel = $connection->channel();

$channel->queue_declare('RequestLog', false, false, false, false);

$msg = new AMQPMessage($request->getContent());
$channel->basic_publish($msg, 'clickhouse-exchange', 'RequestLog');

$channel->close();
$connection->close();
xcuube ,
what then in my case is the best thing to do so that I don't have to open/close often?

Just keep the connection open. If it drops out, reconnect.
By the way, opening/closing the connection quickly is not recommended for RabbitMQ.
Roman Mirr how should I do in my case, so that I don't have to open/close often?
Then you need to monitor the rate at which data is received and sent throughout the chain.

1 Answer

0 votes
Perhaps a data reset to disk? Overlay on the disk activity graph.

I'm not sure that's a problem. If the system works within expectations, it's OK.

2 Comments

Some messages get lost.
xcuube , by keeping a record of the number of sent/received, you can understand which link is failing.