Fixes
- Slight refactor of
RedisPubsub
to callConsumer::current()
directly within while-loop - this allowed for easier mocking in unit tests. - Adding
pcntl
workarounds forPubSub\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 aMockQueue
andMockSubscriber
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
, andConsume
attribute under theRouter
namespace. - Moved exceptions into
Exception
namespace. Message
class now has aparsed_payload
property that can be passed into the constructor or with thesetParsePayload
method along with agetParsedPayload
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.)
- Adding support for
- 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 toRedirectPublisher
and moved to theNimbly\Syndicate\Filter
namespace.- All routing classes (
Router
,Consume
attribute, andRouterInterface
) have been moved to theNimbly\Syndicate\Router
namespace.
Please refer to documentation for more detailed information.