roadrunner-server / roadrunner

🀯 High-performance PHP application server, process manager written in Go and powered with plugins
https://docs.roadrunner.dev
MIT License
7.77k stars 405 forks source link

[πŸ’‘ FEATURE REQUEST]: add support for multiple broker connections #1962

Open shieldz80 opened 2 days ago

shieldz80 commented 2 days ago

Plugin

JOBS

I have an idea!

Hi,

Million thanks for the awesome project!

In my projects at work, I need to connect to different brokers in certain scenarios. For example I need to consume messages from one broker that is assigned to my team, and then during the processing of messages I need to push messages to another broker that is assigned to another team.

I was wondering if perhaps something like this would make sense (using amqp as an example):

amqp:
    # connection name
    brokerA:
        addr: amqp://guest:guest@brokerA:5672/
        tls:
            key: ""
            cert: ""
            root_ca: ""
            client_auth_type: no_client_certs
    # connection name
    brokerB:
        addr: amqp://guest:guest@brokerB:5672/
        tls:
            key: ""
            cert: ""
            root_ca: ""
            client_auth_type: no_client_certs

jobs:
    pipelines:
        pipeline-1:
            driver: amqp
            config:
                # this would be a new option
                connection: brokerA
        pipeline-2:
            driver: amqp
            config:
                # this would be a new option
                connection: brokerB
rustatian commented 2 days ago

Hey @shieldz80 πŸ‘‹ Thank you for the feature request πŸ‘ Generally, I agree with that improvement, but let us see the community reactions.