PHP examples: add a sink data producer

オープン 初心者向け
#4,794 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
json, php
領域
backend, devtools

調査の方向性

examples/python/sink-data-producer/producer.pyを読んでレコードのフィールドとバッチサイズを確認し、次にexamples/php/message-envelope/producer.phpとexamples/php/src/common.phpを参照して、PHPのセットアップと送信呼び出しを確認してください。examples/php/sink-data-producer/producer.phpにプロデューサーを追加し、examples/php/README.mdの「Message Envelopes.」の後に記載してください。ストリームとトピックが存在しない場合に作成し、100バッチを送信して合計をログに記録し、READMEのコマンドが新しいサーバーに対して正常に実行できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

good first issue php
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 with json_encode.
  • examples/php/src/common.php already does the setup: iggy_client() (which reads IGGY_CONNECTION_STRING, or IGGY_HOST, IGGY_PORT, IGGY_USERNAME and IGGY_PASSWORD), ensure_stream_and_topic() and send_payloads(). examples/php/message-envelope/producer.php shows them in use.
  • Add only IGGY_STREAM (default qw) and IGGY_TOPIC (default records), and say in the README that the connection settings are the PHP ones, not the IGGY_ADDRESS of 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
主要言語
Rust
スター
5.2k
フォーク
516
平均マージ
2日 12時間
マージ済み PR(30日)
145

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/iggy のほかの issue

apache/iggy の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。