Releases: php-service-bus/service-bus
Releases · php-service-bus/service-bus
v5.1.0
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
orGenerator
; - Added the ability to initiate a saga with any of the message options;
-
- Previously, it was necessary to pass the saga identifier in each message. Now this can be avoided. An example of work is available in the demo application;
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
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
- A logger(), method has been added that returns a ContextLogger object. In addition to the methods that are available by default within LoggerInterfacе, the throwable() method method is also available
- Removed operationId(), traceId() methods
- A metadata(), method has been added that returns an IncomingMessageMetadata object
- 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.
- Removed CommandHandler and EventListener annotations. CommandHandler and EventListener attributes are now used instead
- 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
- For configuration SimpleRetryCompilerPass used
- 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
- Removed SagaHeader, SagaEventListener annotations
- SagaHeader and SagaEventListener attributes are now used instead
Http client
- For ArtaxHttpClient added the ability to create on the basis of the already configured DelegateHttpClient
Annotations reader
- Despite the name, it no longer allows reading annotations and works exclusively with attributes
v4.1.4: Merge pull request #146 from Guuzen/update_dependencies
Update dependencies
v4.1.3
add message execution timeout
v4.1.2
- Update dependencies
v4.1.1
- Minimum PHP version changed: 7.4
- Packages php-service-bus/storage-common, php-service-bus/storage-sql and php-service-bus/module-storage-sql have been removed. Instead, now use php-service-bus/storage package
- Packages php-service-bus/transport-common, php-service-bus/transport-amqp, php-service-bus/transport-phpinnacle, php-service-bus/module-phpinnacle-transport, php-service-bus/transport-redis, php-service-bus/module-redis-transport have been removed. Instead, now use php-service-bus/transport package
- Removed dependency on
ramsey/uuid
package -
- UUID is now generated by native means. But just in case, a dependency on package
symfony/uid
has been added
- UUID is now generated by native means. But just in case, a dependency on package
- Update dependencies
- Bug fixes
- Types correction
- Removed file system-based mutex implementation
v4.0.6
Using the context level logger in a message handler
v4.0.5
Update default mutex factory
v4.0.4
update dependencies
v4.0.3
Merge remote-tracking branch 'origin/v4.0' into v4.0