PHP examples: add a sink data producer
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
- 88/100
Hướng nghiên cứu
Đọc examples/python/sink-data-producer/producer.py để xem các trường của bản ghi và kích thước lô, sau đó làm theo examples/php/message-envelope/producer.php và examples/php/src/common.php để biết cách thiết lập PHP và các lệnh gọi gửi dữ liệu. Thêm producer tại examples/php/sink-data-producer/producer.php và ghi tài liệu trong examples/php/README.md sau “Message Envelopes.” Hoàn thành khi chương trình tạo stream và topic nếu chúng chưa tồn tại, gửi 100 lô, ghi nhật ký tổng số và lệnh trong README chạy thành công với máy chủ mới.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
The Rust, Java, Node and Python examples include a sink data producer, which fills a topic with JSON records so a sink connector has something to read. The PHP examples have none.
Affected area / component
PHP examples
Proposed solution
Add examples/php/sink-data-producer/producer.php and a "Sink Data Producer" section in examples/php/README.md, after "Message Envelopes".
- Take the record fields and batch sizes from
examples/python/sink-data-producer/producer.py, and build the JSON withjson_encode. examples/php/src/common.phpalready does the setup:iggy_client()(which readsIGGY_CONNECTION_STRING, orIGGY_HOST,IGGY_PORT,IGGY_USERNAMEandIGGY_PASSWORD),ensure_stream_and_topic()andsend_payloads().examples/php/message-envelope/producer.phpshows them in use.- Add only
IGGY_STREAM(defaultqw) andIGGY_TOPIC(defaultrecords), and say in the README that the connection settings are the PHP ones, not theIGGY_ADDRESSof the other SDKs. - The producer creates the stream and topic if they are missing, sends 100 batches of 100 to 499 records, logs the total and exits.
- Use the same
php -d extension="${PHP_IGGY_EXTENSION:-...}"form as the other README commands, so the README script runs it in CI.
New PHP SDK calls are out of scope (#3302 tracks parity).
How to test: build the extension (cargo build in foreign/php), start a fresh server (cargo run --bin iggy-server -- --fresh --with-default-root-credentials), run the README command, and poll a few messages back.
Good first issue
- I think this could be a good first issue for a new contributor
- Ngôn ngữ chính
- Rust
- Star
- 5.2k
- Fork
- 516
- Merge trung bình
- 2 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 145
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- 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 apache/iggy
-
docs good first issue php
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue javascript test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue javascript test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue javascript test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue javascript test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
aosama/astronomical#1973 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 6 ngày
-
complexity: high external-contributors test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Meet-hybrid/soroban-forge#584 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
app bug pets
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
chore(roles): record Elixir bare atom/keyword as StringLit excludes instead of coverage debtĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
dekobon/big-code-analysis#1859 ·
Maintainer thường phản hồi trong vòng 1 ngày