PHP examples: add a message envelope producer and consumer

Cerrado
#4,699 2 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@08abhinav ya está trabajando en esto.

Desde el 2/11/2026.

  • #4718 de @08abhinav — fusionado

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
75/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
php

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
Rust
Estrellas
5.2k
Forks
502
Merge medio
2 d 21 h
PR fusionados (30 d)
159

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/iggy

Todos los issues de apache/iggy

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.