Comments (9)
That true, but I do not want to couple transports in any way. and I do not want to put more stuff to psr-queue lib.
from enqueue-dev.
It is ok put some common implementations to psr-layer. Something similar available for cache https://github.com/php-fig/cache-util/tree/master/src
from enqueue-dev.
Let's try it then.
from enqueue-dev.
Does messages implementations is different for different transports? Message is like value object, similar to cache item.
from enqueue-dev.
They are different. It may have additional stuff to what it the message interface require.
For example. AMQP message has a delivery tag which is used while ack\reject.
from enqueue-dev.
https://www.sandimetz.com/blog/2016/1/20/the-wrong-abstraction :-)
from enqueue-dev.
Yeap, that's my favorite.
from enqueue-dev.
DRY is not a silver bullet and could do harm as well
from enqueue-dev.
I give it a thought and me decided not to introduce a trait. There are the reasons:
- The most important. If we do a change in the trait because we need it in AMQP but at that time it breaks another Message from completely different transport.
- We remove duplication in easy to use and understand the code. Almost getters and setters
- The code is not expected to change often.
The solution: Provide a spec test case for messages so every implementation could be tested against it. This is addressed here: https://github.com/php-enqueue/enqueue-dev/pull/102/files
from enqueue-dev.
Related Issues (20)
- [ExclusiveCommandExtension] report every message HOT 1
- Doctrine DBAL 3.0 and json_array HOT 1
- Failed to create thread: Resource temporarily unavailable (11) in RdKafkaContext.php line 96
- [FS] is not FIFO HOT 1
- Release new enqueue/dbal version HOT 3
- Unescaped SNS MessageAttributes when message headers are used HOT 1
- Laravel 10 support HOT 1
- php-enqueue/amqp-ext not support ext-amqp 2.0 HOT 8
- Laravel 10 is not supported
- DBAL Message handler does not set messageID
- Update the Magento2 module HOT 1
- Next release? HOT 2
- Symfony 7 support HOT 3
- Serializing GPS Message in ProtoBuf format.
- Add ability to add attribute keys in GPS producer
- Is not compatible with php8.2?
- Upgrade doctrine/dbal to 4 and doctrine/orm to 3
- Multiple workers / consumers are consuming the same message twice?
- Required PHP version for new transport HOT 1
- Redis redelivery_delay setting does not work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from enqueue-dev.