Php Service Bus Service Bus Versions Save

PHP Service Bus (publish-subscribe pattern) implementation

v5.1.0

2 years ago

General:

  • The minimum PHP version should now be >=8.0
  • Symfony components version updated to 6.0
  • amphp version updated to 2.6

php-service-bus/sagas:

  • Removed SagaProvider;
  • Added SagaFinder;
  • Sagas are now started with a command (a new annotation has been added - SagaInitialHandler);
  • Any dependencies registered in the DI container can now be used as handler arguments;
  • Handlers can now return Promise or Generator;
  • Added the ability to initiate a saga with any of the message options;
  • SagaCreated, SagaClosed, SagaStatusChanged events can no longer be handled within a saga;

php-service-bus/php-service-bus:

  • Changed logger ID in DI container. Now this is Psr\Log\LoggerInterface;

php-service-bus/argument-resolver

  • Added a new component;

php-service-bus/transport

  • Fixed bug with incorrect traceId;

php-service-bus/mutex

  • Completely changed contract and implementation;

php-service-bus/event-sourcing

  • Now the aggregate doesn't need to be saved. All work with the loaded aggregate is done inside an anonymous function;

php-service-bus/http-client

  • Fixed bug with protocol version indication;

php-service-bus/message-serializer

  • Completely changed contract and implementation;

v5.0.0

3 years ago

Description

The minimum PHP version should now be >=8.0 The application has been designed to be more reliable (while the speed has been reduced). Unfortunately, there are also a large number of backward compatibility violations.. Integrations with travis-ci and scrutinizer have been removed for all repositories. GitHub Actions is now used instead.

Common

  • ServiceBusContext
    • violations() method previously returned an array, now returns a ValidationViolations object in case validation is enabled and there are violations.
    • Removed logContextThrowable(), logContextMessage() methods
    • Removed operationId(), traceId() methods
    • return() method has been removed
    • The deliveryBulk(), method has been added, with which you can send several messages in transactional mode (if the transport does not support transactionality, then messages will be sent concurrently).
    • The delivery() and deliveryBulk() methods can now specify metadata as the last argument using OutcomeMessageMetadata. Metadata will be transferred to the transport in the form of headers. The withTraceId() and traceId() methods have been removed from DeliveryOptions. The withHeader() method is now immutable

Service Bus

  • Bootstrap
    • All initialization methods now accept the absolute path to the root directory of the project as the first parameter.
    • In the container, you can now use environment variable resolving.
  • Configuration
    • Removed CommandHandler and EventListener annotations. CommandHandler and EventListener attributes are now used instead
      • The ability to automatically respond to a runtime or validation error has been removed (Previously, the configuration was specified using the defaultThrowableEvent and defaultValidationFailedEvent properties).
    • Maximum execution time (in seconds) can now be specified for the CommandHandler. In case of a timeout, the message will be sent back to the queue.
      • Previously, the timeout was set only globally for the entire application using the EntryPoint configuration. Now this possibility no longer exists. The global timeout for all command handlers is 600 seconds.
  • Reprocessing messages
    • Added RetryStrategy interface
    • The general principle of work looks like this:
      • For example, we have 1 event and 5 listeners are registered for it. If 2/5 listeners fail, then the message will be sent to the queue indicating the handlers in which the error occurred. After receiving the message, it will be executed only in 2 handlers (in which an error occurred). The process is recursive and lasts until the number of resend attempts expires. After the attempts have been exhausted, the backoff() method is called, in which you can implement, for example, saving a message somewhere for processing in the future.
      • The default implementation is SimpleRetryStrategy
    • Currently there is no possibility to specify processing strategies for a specific handler. This will be fixed in future releases

Transport

  • Important: the default serializer mechanism has been changed.
    • Previously, the message (json) consisted of two keys: namespace, which contained the message class, as well as message, which contained the data. Now the message contains ONLY data, and the type information is transferred in the header x-message-type

Sagas

Http client

Annotations reader

  • Despite the name, it no longer allows reading annotations and works exclusively with attributes

v4.1.4

3 years ago

v4.1.3

3 years ago

v4.1.2

3 years ago
  • Update dependencies

v4.1.1

3 years ago

v4.0.6

4 years ago

v4.0.5

4 years ago

Update default mutex factory

v4.0.4

4 years ago

v4.0.3

4 years ago