Reputation: 35
Does RabbitMQ have a limit in the topic size?
I've looked around the web but was not able to find any reasonable answer...
Upvotes: 0
Views: 838
Reputation: 22051
The maximum length of a topic exchange's routing key is 255 bytes.
From the documentation (see the "Topic exchange" subsection):
There can be as many words in the routing key as you like, up to the limit of 255 bytes.
Update
This length is defined as part of the AMQP version 0.9.1 specification.
You can see the related documentation here: basic.publish.routing-key:
shortstr
routing-keySpecifies the routing key for the message. The routing key is used for routing messages depending on the exchange configuration.
The data type of the routing key is shortstr
which has a separate definition:
shortstr
- short string (max. 256 characters)
Note that here the documentation actually say "256 characters" - which is different from the tutorial documentation of "255 bytes".
(I have not created a routing key using multibyte characters. So "bytes" may or may not equal "characters", here.)
Upvotes: 1