rabbitmq-exchange

Dynamic SendTo annotation

回眸只為那壹抹淺笑 提交于 2019-12-25 05:37:05
问题 I have Java code as following to receive messages form a queue, process it and write processed message to another queue. @RabbitListener(queues = "rawFusion") @SendTo("Fusion") public String receiverFusion(Object _message) { String message = getMessage(_message); return messageParser.parse(message); } Here i always get messages from "rawFusion" queue and write it into "Fusion" queue. The thing I want to do is, writing messages different queues depending on some conditions. So i would like

List bindings for an exchange with rabbitmq java client API

蹲街弑〆低调 提交于 2019-12-24 12:08:16
问题 I can't seem to find any information in the documentation so I was wondering if it was somehow possible to get all the bindings related to an exchange using the java RabbitMQ API. I'm looking for something like the http api result when querying /api/bindings. 回答1: /api/definitions is the API endpoint to get list of definitions including exchanges, queues, bindings, users, virtual hosts, permissions and parameters. ref:https://pulse.mozilla.org/api/ 来源: https://stackoverflow.com/questions

RabbitMQ : Create Dynamic queues in Direct Exchange

北战南征 提交于 2019-12-24 03:08:13
问题 I am new to RabbitMQ, I just went through Rabbitmq docs (Routing). I am quite confused between Exchange with routing keys. My requirement is , I want to create multiple queues dynamically. Please refer below diagram. Ex. Lets say If producer create message for consumer c3, then it should go to Exchange and route to Queue 3 only and consume by C3 only. At present I only require 3 Queues in future this count may increase. so how to deal with this situation too. Note : I refer this blog Exchange

How to authenticate rabbitmq in nodejs?

房东的猫 提交于 2019-12-12 18:01:26
问题 Error: Handshake terminated by server: 403 (ACCESS-REFUSED) with message "ACCESS_REFUSED - Login was refused using authen tication mechanism PLAIN. For details see the broker logfile." I tried authMechanism individually ('PLAIN', 'AMQPLAIN', 'EXTERNAL') but i'm getting same error. Unable to create connection with rabbitMQ var raabitmqSettings = { protocol: 'amqp', hostname: '10.250.18.31', port: 5672, username: 'sam', password: 'sam@123', vhost: '/', authMechanism: ['PLAIN', 'AMQPLAIN',

Is there a limit to the number of exchanges for rabbitmq?

风格不统一 提交于 2019-12-12 16:04:30
问题 Could not find anything about this in either the docs or on google, except that it should be bound to the available resources of the server. Does anyone have experience with really large numbers of exchanges at a time in a working environment? Just creating exchanges should not be the issue (simply until the memory limit is reached) but to use it in a working project with high-message throughput and mostly dynamic exchange creation/deletion. 回答1: Given how everything else in RabbitMQ is built

How to use multiple vhosts in a Spring RabbitMQ project?

拟墨画扇 提交于 2019-12-11 04:38:04
问题 I've the following two Configuration classes: @Configuration @EnableRabbit @Import({ LocalRabbitConfigA.class, CloudRabbitConfigA.class }) public class RabbitConfigA { @Autowired @Qualifier("rabbitConnectionFactory_A") private ConnectionFactory rabbitConnectionFactory; @Bean(name = "admin_A") AmqpAdmin amqpAdmin() { return new RabbitAdmin(rabbitConnectionFactory); } @Bean(name = "Exchange_A") DirectExchange receiverExchange() { return new DirectExchange("Exchange_A", true, false); } } And

why do we need routing key in rabbitmq

孤街浪徒 提交于 2019-12-08 15:55:57
问题 I am wondering why do we need routing key to route message from exchange to queue. Can't we use the simply queue name to route the message. Also, in case of publishing to multiple queues we can use multiple queue names. Can anyone point out the scenario where we actually need routing key, queue name won't be suffice. 回答1: There are several types of exchanges. The fanout exchange ignores the routing key and sends messages to all queues. But pretty much all other exchange types use the routing

How do I get old messages from RabbitMQ?

房东的猫 提交于 2019-12-08 13:27:12
问题 I'm publishing RabbitMQ messages using Bunny (Ruby) like this: x.publish("Message !"+n.to_s, :routing_key => 'mychannel') and subscribing like this: ch = conn.create_channel x = ch.topic('fling',durable: true) q = ch.queue("") q.bind(x, :routing_key => 'mychannel') puts "Waiting for messages." q.subscribe( :block => true) do |delivery_info, properties, body| puts " [x] Received #{body}, message properties are #{properties.inspect}" Once I start the subscriber, it immediately receives any

Topic exchange ambiguity with RabbitMQ

谁说我不能喝 提交于 2019-12-07 18:25:08
问题 I'm a little confused. I'm trying to implement topic exchanges and am not sure what is needed. I want to have several routing keys and 1 topic exchange (the default amq.topic). My keys would be like: customer.appA.created customer.appB.created customer.*.created I want my queue(s) to be durable, but do I need 1 'customer' queue or 2 queues for appA and appB? I have my publisher figured out; connect, exchange declare, basic publish . But I'm struggling with the consumers. Let's say I want to

Expired Message Delivery Sequence RabbitMQ

萝らか妹 提交于 2019-12-06 14:48:06
We are building a solution in which we are publishing message to a time-out queue. After TTL expiry messages are pushed to main queue for re-processing. We are setting up counter value so that messages will be tried for x no. of times for the redelivery. Solution is working fine. But the scenario is when the message on the head position is highest TTL is not expired, other messages of lower expiry will not be re-published (to main queue). Is this understanding correct ? If Yes what is the solution so that each message re-processed just after TTL. Appreciating answers / viewpoint. Thanks. If