Skip to content

Release 2.0

Latest
Compare
Choose a tag to compare
@brentscheffler brentscheffler released this 25 Feb 20:04
46765d9

Fixes

  • Slight refactor of RedisPubsub to call Consumer::current() directly within while-loop - this allowed for easier mocking in unit tests.
  • Adding pcntl workarounds for PubSub\Redis that will correctly interrupt and shutdown when new messages arrive. Library still hard blocks while idle/waiting for new messages.

Updates

  • Splitting out Mock into a MockQueue and MockSubscriber classes, updating unit tests due to the namespace change.
  • Unifying all adapters under the Adapter namespace.
  • Moved interfaces for publishers, consumers, and subscribers into Adapter namespace.
  • Moved Router, RouterInterface, and Consume attribute under the Router namespace.
  • Moved exceptions into Exception namespace.
  • Message class now has a parsed_payload property that can be passed into the constructor or with the setParsePayload method along with a getParsedPayload method.
  • Reorganized and greatly expanded documentation.
  • Increased code coverage.
  • Some adapters have had publishing options moved into the Message attributes (Mqtt, Sns, Beanstalk, RabbitMQ). This move is a more natural fit as these options are tightly coupled to the Message itself (eg, Message ID, Group ID, QOS, etc.), and not necessarily publishing in general.

New features

  • New Adapters
    • Adding support for Gearman.
    • Adding support for Outbox (publish only.)
    • Adding support for Mercure (publish only.)
    • Adding support for NullPublisher (publish only.)
    • Adding support for Segment (publish only.)
  • Validators: validate Messages against a schema or other rule set. Validators can be used in filters or in middleware.
    • JSON Schema support added
  • Middleware: Interact with messages before and after processing.
    • ValidateMessage middleware that validates all incoming (consumed) messages.
    • DeadletterMessage middleware that will deadletter Subscriber based consumers.
    • ParseJsonMessage middleware that will parse your JSON messages and attach parsed payload to Message.
  • Filters: chain one or more filters to a publisher to add new functionality.
    • RedirectFilter redirects a Message to specific topic instead of the Message's topic.
    • ValidatorFilter validates messages against given validator before being publishing. Throws exception if message does not validate.

Breaking changes

  • All adapters have been moved under a single Nimbly\Syndicate\Adapters namespace.
  • All exceptions have been moved to the Nimbly\Syndicate\Exceptions namespace.
  • DeadletterPublisher has been renamed to RedirectPublisher and moved to the Nimbly\Syndicate\Filter namespace.
  • All routing classes (Router, Consume attribute, and RouterInterface) have been moved to the Nimbly\Syndicate\Router namespace.

Please refer to documentation for more detailed information.