Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Stomp Bundle Laravel Package

activpik/stomp-bundle

Symfony bundle integrating a STOMP client for message brokers. Configure multiple connections and named producers, enable sandbox mode for testing, create messages via a factory, and send them through the activpik_stomp service from your controllers.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Microservices/Event-Driven Fit: The bundle enables STOMP-based messaging, aligning well with architectures requiring asynchronous communication (e.g., event sourcing, task queues, or decoupled services). However, its Symfony 2 specificity may limit adoption in modern Symfony 5/6+ or non-Symfony PHP stacks.
  • Legacy System Integration: Ideal for monolithic Symfony 2 applications needing lightweight messaging without heavy frameworks (e.g., RabbitMQ PHP client). Poor fit for serverless or Kubernetes-native deployments lacking STOMP brokers.
  • Protocol Limitations: STOMP is text-based and lacks native support for binary payloads or advanced QoS features (e.g., persistent queues). May require workarounds for complex use cases.

Integration Feasibility

  • Symfony 2 Dependency: High risk for new projects or Symfony 3+ apps due to:
    • Deprecated APIs (e.g., Container access patterns, config.yml over config/packages).
    • Missing Symfony Flex support (no autoloading or modern bundle structure).
  • Broker Agnosticism: Works with any STOMP-compatible broker (ActiveMQ, Artemis, etc.), but no built-in retry/backoff or circuit-breaker logic. Requires custom error handling.
  • Testing: Sandbox mode is useful for local development, but no mocking utilities for unit tests. Integration tests will need a real broker.

Technical Risk

Risk Area Severity Mitigation Strategy
Symfony 2 Obsolescence Critical Fork/rewrite for Symfony 5+ or use alternatives (e.g., symfony/messenger).
No Consumer Support High Implement consumers manually or extend the bundle.
Connection Management Medium Add health checks and connection pooling.
Message Serialization Low Extend MessageFactory for custom formats.

Key Questions

  1. Why Symfony 2?
    • Is this for maintaining a legacy app, or is there a justification for avoiding newer Symfony versions?
  2. Broker Requirements
    • What STOMP broker is in use? Are there authentication/SSL needs not covered by the bundle?
  3. Scaling Needs
    • Will producers/consumers need horizontal scaling? The bundle lacks built-in load balancing.
  4. Monitoring
    • How will message delivery failures or broker health be monitored?
  5. Alternatives
    • Has symfony/messenger (with STOMP transport) or php-amqplib been considered? Why not?

Integration Approach

Stack Fit

  • Symfony 2 Stack: Native fit with minimal changes (composer + config.yml).
  • Non-Symfony PHP: Poor fit—would require wrapping the bundle in a service container or rewriting core logic.
  • Modern Symfony (5/6+):
    • Option 1: Fork the bundle and adapt to Symfony’s DI component.
    • Option 2: Use symfony/messenger with a STOMP transport (preferred long-term).
  • Broker Stack:
    • ActiveMQ/Artemis: Works out-of-the-box.
    • Custom Brokers: May need protocol tweaks or middleware.

Migration Path

  1. Pilot Phase:
    • Add the bundle to a non-production Symfony 2 environment.
    • Test with the sandbox mode, then a real broker.
  2. Configuration:
    • Start with one producer/consumer pair (e.g., kalyzee_messaging).
    • Gradually expand based on success.
  3. Symfony 2 → 5/6+:
    • If upgrading, replace this bundle with symfony/messenger + STOMP transport.
    • Use a feature flag to toggle between old/new messaging.

Compatibility

  • Symfony Components: Relies on ContainerInterface (Symfony 2) and Config component. No PHP 8 support (assumes PHP 5.4+).
  • STOMP Spec: Adheres to STOMP 1.0/1.1, but lacks STOMP 1.2 features (e.g., SEND frame improvements).
  • Database/ORM: No direct ties, but message persistence (e.g., retries) would need custom logic.

Sequencing

  1. Phase 1: Implement one-way producers (e.g., logging, analytics).
  2. Phase 2: Add basic consumers (if needed) with manual ACK handling.
  3. Phase 3: Integrate with existing workflows (e.g., trigger jobs on message receipt).
  4. Phase 4: Add monitoring/metrics (e.g., message counts, latency).

Operational Impact

Maintenance

  • Bundle Maturity: Low (0 stars, no dependents, unmaintained repo). Expect no updates or issue resolution.
  • Dependency Risk:
    • Ties to Symfony 2 (EOL since 2017) and legacy STOMP clients.
    • No security patches for underlying STOMP library.
  • Customization:
    • Extending the bundle (e.g., adding consumers) requires forking due to lack of documented hooks.

Support

  • Community: Nonexistent. Issues will require self-service debugging.
  • Documentation: Minimal (README only). Assumptions about Symfony 2 internals may mislead.
  • Vendor Lock-in: High—migrating away requires rewriting messaging logic.

Scaling

  • Horizontal Scaling:
    • Producers: Can scale independently (stateless), but no built-in load balancing.
    • Consumers: Requires manual partitioning (e.g., by message type) or external tools.
  • Performance:
    • No connection pooling—each request may open a new STOMP connection.
    • Blocking I/O: Synchronous send() calls may cause bottlenecks under load.
  • Broker Limits:
    • STOMP brokers may throttle connections or drop messages during spikes.

Failure Modes

Failure Scenario Impact Mitigation
Broker Unavailable Messages lost (no retry). Implement exponential backoff.
Symfony Container Issues Producers/consumers fail. Use dependency injection.
Message Serialization Errors Corrupted payloads. Validate messages before sending.
Symfony 2 Upgrade Bundle breaks. Plan migration to messenger.
Resource Exhaustion Too many connections. Limit connections per instance.

Ramp-Up

  • Developer Onboarding:
    • 1–2 days for basic producer setup (if familiar with Symfony 2).
    • 1 week+ for consumers or advanced use cases (due to lack of docs).
  • Operational Onboarding:
    • Broker configuration (hosts, credentials) adds 1–3 days.
    • Monitoring setup (e.g., Prometheus metrics) requires custom work.
  • Training Needs:
    • STOMP protocol basics (e.g., frames, ACK modes).
    • Symfony 2 service container quirks (e.g., get() vs. DI).
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui