ITADN

framing error: serde error: invalid length 0, expected struct BasicPropertities

#161Closedigostv 创建于 2025-04-01
I
igostvcommented
An error occurs when receiving a message if all message properties are set. If you skip at least one of any properties, then there is no error. ```bash ERROR amqprs::net::reader_handler: socket will be closed due to failure of reading frame, cause: framing error: serde error: invalid length 0, expected struct BasicPropertities ``` getting error on RabbitMQ 4.0.3 patch for /amqprs/examples/src/basic_pub_sub.rs to reproduce the error ```rust let mut headers = FieldTable::new(); headers .insert("key".try_into().unwrap(), "value".try_into().unwrap()); let props = BasicProperties::default() .with_app_id("app_id") .with_cluster_id("cluster_id") .with_content_encoding("content_encoding") .with_content_type("content_type") .with_correlation_id("correlation_id") .with_expiration("100000") .with_message_id("message_id") .with_message_type("message_type") .with_persistence(true) .with_priority(1) .with_reply_to("reply_to") .with_timestamp(1743000001) .with_user_id("user") .with_headers(headers) .finish(); channel .basic_publish(props, content, args) .await .unwrap(); ```
关闭于 2025-04-04 2 条评论