Giter VIP home page Giter VIP logo

Comments (8)

AnthonyMastrean avatar AnthonyMastrean commented on June 2, 2024 1

@andrewmweaver89 we encountered the same problem, here's what you can do without changing your queue bindings...

  1. Turn on the firehose tracer
rabbitmqctl trace_on
  1. Tap the trace exchange
raptap amq.rabbitmq.trace:#

from rabtap.

jandelgado avatar jandelgado commented on June 2, 2024

Hi, when tapping messages, rabtap is creating a temporary exchange-to-exchange binding on the exchange being tapped. It seems that RabbitMQ does not generally allow to bind to the default exchange, as this code excerpt from RabbitMQ suggests (if I intepret it correcty):

https://github.com/rabbitmq/rabbitmq-server/blob/79da341df49a8fc54229b930bd0e8d52f4209f64/src/rabbit_channel.erl#L1950-L1960

To solve your problem, you could bind your queue e.g. to the amq.direct exchange and then tap this exchange with the queues name as the binding key.

from rabtap.

andrewmweaver89 avatar andrewmweaver89 commented on June 2, 2024

Ok. First thanks for the response 👍

Ccurrently all my queues are just using the default exchange(""). If I understand you correctly, I would need to bind my queue to amq.direct and then have all my messages directed to that exchange via my application?

from rabtap.

jandelgado avatar jandelgado commented on June 2, 2024

Yes, there are many options depending on your requirements. RabbitMQ supports different exchange types (e.g. direct, fanout, topic, header), which define how messages are routed. When using the pre-defined amq.direct exchange (type direct), you bind your queue to this exchange using a provided binding key, e.g. MYKEY. Published messages to exchange amq.direct are routed to all queues where the provided routing key equals the binding key (e.g. MYKEY).

Have a look at the basic concepts documentation of RabbitMQ and the official tutorials for further information.

from rabtap.

andrewmweaver89 avatar andrewmweaver89 commented on June 2, 2024

Awesome. Thanks for the prompt, detailed reply!

from rabtap.

jandelgado avatar jandelgado commented on June 2, 2024

Thanks for the info, I'll put it in the FAQ.

from rabtap.

jmgarnier avatar jmgarnier commented on June 2, 2024

Thanks @AnthonyMastrean I think you saved me a lot of time. Putting it in the FAQ will help a lot of people. I can push a PR. But where is the FAQ? Maybe the 1st https://github.com/jandelgado/rabtap#examples ?

from rabtap.

jandelgado avatar jandelgado commented on June 2, 2024

Hi, I documented the example in #44 , will merge after a review. BR jan

from rabtap.

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.