Giter Site home page Giter Site logo

Comments (9)

makasim avatar makasim commented on May 20, 2024

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.

Koc avatar Koc commented on May 20, 2024

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.

makasim avatar makasim commented on May 20, 2024

Let's try it then.

from enqueue-dev.

Koc avatar Koc commented on May 20, 2024

Does messages implementations is different for different transports? Message is like value object, similar to cache item.

from enqueue-dev.

makasim avatar makasim commented on May 20, 2024

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.

bendavies avatar bendavies commented on May 20, 2024

https://www.sandimetz.com/blog/2016/1/20/the-wrong-abstraction :-)

from enqueue-dev.

makasim avatar makasim commented on May 20, 2024

Yeap, that's my favorite.

from enqueue-dev.

makasim avatar makasim commented on May 20, 2024

DRY is not a silver bullet and could do harm as well

from enqueue-dev.

makasim avatar makasim commented on May 20, 2024

I give it a thought and me decided not to introduce a trait. There are the reasons:

  1. 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.
  2. We remove duplication in easy to use and understand the code. Almost getters and setters
  3. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.