Code Monkey home page Code Monkey logo

Comments (5)

mihaitodor avatar mihaitodor commented on June 3, 2024 1

@rtkkroland: Not really. Just that the switch output requires that you to know the URLs when writing the config while interpolation allows you to extract the URL from each message at runtime. Benthos still has to extract some field from the message in each switch case to figure out which output to route the message to, so that will incur a similar performance penalty.

from benthos.

krdenison avatar krdenison commented on June 3, 2024

Looking to do something like this in the url field where route is added to metadata by a previous processor and can be one of up to 20 values.

    output:
      aws_sqs:
        url: 'https://sqs.us-west-2.amazonaws.com/AWS_ACCOUNT/${! meta("route") }'
        max_in_flight: 64

from benthos.

Jeffail avatar Jeffail commented on June 3, 2024

Hey, this is technically possible as we can specify the URL per batch send request. However, one minor annoyance is that when you batch messages up (which is recommended for performance reasons) each individual message could yield a different URL, and so the logic and predictability of batch dispatching becomes much more complicated.

from benthos.

rtkkroland avatar rtkkroland commented on June 3, 2024

Would having URL determined per message be worse/better performance than using the switch output?

from benthos.

rtkkroland avatar rtkkroland commented on June 3, 2024

Awesome, let's do URL interpolation then! :D

  • Similar performance
  • Run-time configurable

from benthos.

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.