Extension of Quarkus example with structured content mode
@matejvasek đang làm issue này rồi.
Từ ngày 19/7/2022.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
I like the Quarkus example.
However, it seems to use the Binary Content Mode. I however require the Structured Content Mode. Initially I did not even notice that the binary mode left out the metadata from the body. I did not even notice initially there were 2 modes.
It took me quite some time that all that's required is adding the annotation @Consumes( JsonFormat.CONTENT_TYPE ) to the client:
@Path( "/notify" )
@RegisterRestClient
public interface BrokerClient {
@POST
@Consumes( JsonFormat.CONTENT_TYPE )
void emit( CloudEvent event);
}
Will trigger sending the request in the Structured Content Mode.
Likewise adding a @Consumes( JsonFormat.CONTENT_TYPE ) to the server:
@POST
@Path( "notify" )
@Consumes( JsonFormat.CONTENT_TYPE )
public Response create( CloudEvent event ) {
// logic
}
Fixes the server part. All the more confusing is that this reference mentions the Quarkus example (while discussing the structured content mode).
Suggestion: update the README.md or extend the example.
- Ngôn ngữ chính
- Java
- Star
- 446
- Fork
- 172
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cloudevents/sdk-java
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
cloudevents/sdk-java#731 · 1 reaction ·
-
bug
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
cloudevents/sdk-java#697 · 3 bình luận ·
-
Spring CloudEventMessageConverter produce a null pointer exception if initial message header map is nullCó thể đã có người làm @prashantdotnaagar đã nhận 81 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
cloudevents/sdk-java#689 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
cloudevents/sdk-java#660 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
cloudevents/sdk-java#748 ·
Tất cả issue của cloudevents/sdk-java
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
portfolio-performance/portfolio#6119 ·
Maintainer thường phản hồi trong vòng 8 ngày
-
Bump up AWS SDK to 2.54.3Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
jenkinsci/ec2-plugin#2041 ·
-
L: github:actions L: php:composer
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
dependabot/dependabot-core#16493 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
SHOW EDIT of a subclass for an object of its superclass: the form fails to open with AssertionErrorĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100