PHP examples: add a message envelope producer and consumer

Aperta
#4,699 2 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@08abhinav ci sta già lavorando.

Dal 2/11/2026.

  • #4718 di @08abhinav — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
75/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
php

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
Rust
Stelle
5.2k
Fork
502
Merge medio
3g 5h
PR unite (30g)
152

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/iggy

Tutte le issue di apache/iggy

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.