You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specify a long routing key (>255 characters) when binging a queue to an exchange: topology.bind(exchange, queue, longRoutingKey);
No errors will be reported but the process will hang forever.
Specify a long routing key (>255 characters) when sending the message: producer->send(message, longRoutingKey, ...);
The following error will be reported: 13JAN2025_08:46:10.559653 350290 140737331340864 WARN /home/pasick/github/pasick-clean/rmqcpp/src/rmq/rmqio/rmqio_asioconnection.cpp 410 UNINITIALIZED_LOGGER_MANAGER Socket closed: Connection reset by peer. Current state: 1
and the connection will be closed.
The topic exchange routing key has a limitation of 255 bytes (see https://www.rabbitmq.com/tutorials/tutorial-five-go#:~:text=There%20can%20be%20as%20many,be%20in%20the%20same%20form.). However, this limitation is not applied when binding queue to an exchange or sending the message:
To Reproduce
topology.bind(exchange, queue, longRoutingKey);
No errors will be reported but the process will hang forever.
producer->send(message, longRoutingKey, ...);
The following error will be reported:
13JAN2025_08:46:10.559653 350290 140737331340864 WARN /home/pasick/github/pasick-clean/rmqcpp/src/rmq/rmqio/rmqio_asioconnection.cpp 410 UNINITIALIZED_LOGGER_MANAGER Socket closed: Connection reset by peer. Current state: 1
and the connection will be closed.
Please refer to the attached sample which demonstrates the issue:
longRoutingKeyIssue.txt
Expected behavior
I believe that the size of the routing key should be validated and do not accept values larger that 255 bytes.
The text was updated successfully, but these errors were encountered: