krakend / krakend-amqp

AMQP compatible backend for the KrakenD framework
https://www.krakend.io
Apache License 2.0
10 stars 16 forks source link

Customize the type of exchange #3

Closed TheHack42 closed 1 year ago

TheHack42 commented 4 years ago

Hello,

I would like to be able to customize the type of exchange used. In hard, the value is "topic" and I would like to use "direct".

I made the modification on a local branch but I do not have the authorization to push it. It would be enough simply to add a key "type" in the configuration :

# customer.go
# [...]
    err = ch.ExchangeDeclare(
        cfg.Exchange, // name
        cfg.Type,     // type
# [...]
# producer.go
# [...]
    err = ch.ExchangeDeclare(
        cfg.Exchange, // name
        cfg.Type,     // type
# [...]
# client.go
# [...]
type queueCfg struct {
    Name          string   `json:"name"`
    Type          string   `json:"type"`
# [...]
# client_test.go
# [...]
            consumerNamespace: map[string]interface{}{
                "name":           "queue-1",
                "type":           "topic",
                "exchange":       "some-exchange",
# [...]
            producerNamespace: map[string]interface{}{
                "name":      "queue-1",
                "type":      "topic",
                "exchange":  "some-exchange",

When do you think ?

PS : Excuse me for my English, I speak French.

kpacha commented 4 years ago

@TheHack42 , please excuse the huge delay... the issue wasn't added to the project and it ended being totally forgotten.

I think it's a great idea, please go ahead and create a PR with your changes.

cheers!

alombarte commented 1 year ago

Closing for inactivity