Giter VIP home page Giter VIP logo

Comments (7)

armetiz avatar armetiz commented on August 18, 2024

Hum, because with Beanstalkd you can launch as many servers as you want easily, I'm not sure of that option will be a useful feature.

I guess, it's more safe to define a new pheanstalk connexion instead of prefixing tubes.

leezy_pheanstalk:
    enabled: true
    pheanstalks:
        production:
            server: 127.0.0.1
            port: 11300
            timeout: 60
            default: true
        dev:
            server: 127.0.0.1
            port: 11301
            timeout: 60
            default: false

Is that ok for you ?

from leezypheanstalkbundle.

h4cc avatar h4cc commented on August 18, 2024

That would work, but in my case i would need more then 7 beanstalk instances.

I think i will try to implement that feature in a branch first.

from leezypheanstalkbundle.

armetiz avatar armetiz commented on August 18, 2024

In fact, you want to create seven pheanstalk connection that point to the same server ? Each pheanstalk connection with a specific tube prefix ?

In that case, maybe it could be a good solution to create an inherited class of Proxy\PheanstalkProxy with the prefix feature. What do you think about it ?

Like Acme\Proxy\PrefixedPheanstalkProxy, which take the "prefix" in the constructor. Create seven instances in the DIC and use the following :

leezy_pheanstalk:
    pheanstalks:
        production:
            server: 127.0.0.1
            port: 11301
            timeout: 60
            default: true
            proxy: acme.pheanstalk.proxy.production
        dev:
            server: 127.0.0.1
            port: 11301
            timeout: 60
            proxy: acme.pheanstalk.proxy.dev

See the following documentation : https://github.com/armetiz/LeezyPheanstalkBundle/blob/master/Resources/doc/5-custom-proxy.md

from leezypheanstalkbundle.

h4cc avatar h4cc commented on August 18, 2024

Good hint. Thanks.

In the end it will be one beanstalkd server, and about seven sf2 applications sharing that server.
Every application needs to use beanstalk, but the tubes should not be mixed between the applications.

from leezypheanstalkbundle.

armetiz avatar armetiz commented on August 18, 2024

I think it's really a good solution to define your own Proxy.

Thanks for using this bundle ;)

from leezypheanstalkbundle.

h4cc avatar h4cc commented on August 18, 2024

Just wanted to let you know, i implemented a proxy that can prefix all tube names:

https://github.com/h4cc/LeezyPheanstalkBundleExtra

from leezypheanstalkbundle.

armetiz avatar armetiz commented on August 18, 2024

@h4cc I've add a link in the README.

from leezypheanstalkbundle.

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.