Giter VIP home page Giter VIP logo

Comments (5)

filiphaftek avatar filiphaftek commented on June 10, 2024

Hi, would have time to make a PR for it? According to RabbitMQ docs, this could be achieved like this:

for severity in severities:
    channel.queue_bind(exchange='direct_logs',
                       queue=queue_name,
                       routing_key=severity)

(https://www.rabbitmq.com/tutorials/tutorial-four-python.html).
So in the code, apart from switching from string to list in routing key, you would have to iterate over the list in this method: https://github.com/AirHelp/rabbit-amazon-forwarder/blob/master/rabbitmq/consumer.go#L109. I can write some tests for that piece of code :)

from rabbit-amazon-forwarder.

adamlc avatar adamlc commented on June 10, 2024

Yeah, it should be as simple as adding a few extra queue binds in a loop like you've mentioned.

I guess the next thing to consider is how do we specify in the mapping file? At the moment routing is a string. Changing that to an array will obviously be a breaking change. Do we add a new option or make a breaking change?

from rabbit-amazon-forwarder.

adamlc avatar adamlc commented on June 10, 2024

I guess we could make RoutingKey a generic interface{} and check if its a string or []string as a possible solution?

from rabbit-amazon-forwarder.

filiphaftek avatar filiphaftek commented on June 10, 2024

Breaking change is not possible at the moment, as this is used on production. routingKeys could be added as an extra filed to json imho.

from rabbit-amazon-forwarder.

adamlc avatar adamlc commented on June 10, 2024

Makes sense! I'll have a stab at this sometime 👍

from rabbit-amazon-forwarder.

Related Issues (16)

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.