PHP examples: add a message envelope producer and consumer

オープン
#4,699 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

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

@08abhinav がすでに取り組んでいます。

2026年11月2日 から。

  • #4718 @08abhinav による — オープン

評価

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

調査の方向性

Start with examples/src/common.php for the existing helpers (iggy_client(), ensure_stream_and_topic(), send_payloads(), example_payloads()), then read the order types in examples/node/src/message-envelope/. Write examples/php/message-envelope/producer.php and consumer.php, with the consumer switching on message_type and logging and skipping unknown types. Done when both scripts run against a fresh server using the extension from foreign/php and the README has a Message Envelopes section.

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

説明

good first issue php
Description

The Rust, Node, Java and C# examples show the message envelope pattern, where each payload is wrapped in a JSON object with a message_type and a payload string so one topic can carry several message kinds. The PHP examples have only getting-started and basic.

Affected area / component

PHP examples

Proposed solution

Add examples/php/message-envelope/producer.php and consumer.php, and a "Message Envelopes" section in examples/php/README.md.

  • The helpers in examples/php/src/common.php (iggy_client(), ensure_stream_and_topic(), send_payloads(), example_payloads()) already do the set-up, so the work is the envelope encoding (json_encode) and the consumer's match on message_type.
  • Take the order types from examples/node/src/message-envelope/.
  • A message with an unknown type is logged and skipped.

New PHP SDK calls are out of scope (#3302 tracks PHP parity).

How to test: build the extension with cargo build in foreign/php, start a fresh server, and run both scripts with the same -d extension="${PHP_IGGY_EXTENSION:-...}" form the README's other commands use.

Good first issue
  • I think this could be a good first issue for a new contributor
主要言語
Rust
スター
5.2k
フォーク
502
平均マージ
3日 4時間
マージ済み PR(30日)
157

環境構築

Codespaces で開く

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

はじめの一歩

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

apache/iggy のほかの issue

apache/iggy の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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