Skip to content

RabbitMQ messages not consumed quickly enough #74430

@eugbaranov

Description

@eugbaranov

Describe the situation
I have a RabbitMQ queue which receives messages at a rate about 20,000s.

CREATE TABLE default.Queue
(
`Data` String
)
ENGINE = RabbitMQ
SETTINGS rabbitmq_host_port = 'host:5672',
         rabbitmq_exchange_name = 'Exchange',
         rabbitmq_format = 'JSONAsString',
         rabbitmq_exchange_type = 'direct',
         rabbitmq_routing_key_list = 'messages',
         rabbitmq_queue_settings_list = 'x-max-length=2000000, x-overflow=reject-publish',
         rabbitmq_flush_interval_ms = 100,
         date_time_input_format = 'best_effort';

In materialized view I parse the message with simpleJSONExtractString functions and push the data to AggregatingMergeTree.

In RabbitMQ my queue fill up pretty quickly:
image
but in the log I see that CH quite often "processed 0 rows" despite there are plenty of messages in the queue:
image

Not sure how what to do to fix it:

  1. Tried tweaking rabbitmq_flush_interval_ms - but the queue still ends up full
  2. Tried adding more consumers - that will work for some time but at some point both consumers disconnect and never reconnect again.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions