AMQContentHeader toString uses dashes instead of underscores for property names

Đang mở
#148 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
50/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java, rabbitmq
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu trong com.rabbitmq.client.impl.AMQContentHeader và kiểm tra toString cùng với appendPropertyDebugStringTo. Cập nhật tên các thuộc tính AMQP được hiển thị để sử dụng dấu gạch dưới thay vì dấu gạch ngang, sau đó xác minh rằng đầu ra thu được khớp với các tên thuộc tính chính thức được liệt kê trong issue.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

effort-tiny usability

The com.rabbitmq.client.impl.AMQContentHeader has the following toString implementation

    @Override public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("#contentHeader<").append(getClassName()).append(">");
        this.appendPropertyDebugStringTo(sb);
        return sb.toString();
    }

It generates strings like this

#contentHeader<basic>(content-type=application/json, content-encoding=UTF-8, headers={topic=DOWNLOAD_AND_INSTALL, content-type=application/json, type=EVENT, tenant=DEFAULT, __TypeId__=org.eclipse.hawkbit.dmf.json.model.DownloadAndUpdateRequest, thingId=new_device}, delivery-mode=2, priority=0, correlation-id=null, reply-to=null, expiration=null, message-id=null, timestamp=null, type=null, user-id=null, app-id=null, cluster-id=null)

This could make believe that content-type, content-encoding,..... are "valid" AMQP properties, while in fact RabbitMQ states :

Invalid properties will be ignored. Valid properties are:

content_type
content_encoding
priority
correlation_id
reply_to
expiration
message_id
timestamp
type
user_id
app_id
cluster_id

Notice the difference between the dash (-) and the ('_underscore')

To avoid confusion, the java client should print the "official" property names using underscores.

Ngôn ngữ chính
Java
Star
1.3k
Fork
588
Merge trung bình
4 giờ 40 phút
Pull request đã merge (30 ngày)
38

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của rabbitmq/rabbitmq-java-client

Tất cả issue của rabbitmq/rabbitmq-java-client

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.