amqp

Spring AMQP and ShutdownSignalException

倖福魔咒の 提交于 2019-12-25 08:25:10
问题 I have an AMQP Project with Spring AMQP. The RabbitMQ Server is not mine, so I have no control over it. When my application starts, it makes a private response queue like this: @Bean(name="myAnonymousResponseQueue") public Queue myAnonymousResponseQueue() { Queue q = myAmqpAdmin().declareQueue(); return q; } And I have a SimpleMessageListenerContariner like this: @Bean public SimpleMessageListenerContainer myResponseMessageListenerContainer() { SimpleMessageListenerContainer container = new

Installing RabbitMQ PHP: Fatal error: Class 'AMQPConnection' not found

扶醉桌前 提交于 2019-12-25 08:13:52
问题 I've already installed the RabbitMQ on my server and everything is working fine with it. I already tried to send and receive queued messages with a Java client and everything went perfect. Now I need to install a PHP RabbitMQ client because I want to communicate a Java program with a PHP webpage, but this time I'm not beign so lucky. I already followed the steps of the official webpage for this installation, specifically these steps: # Download the rabbitmq-c library hg clone http://hg

AMQP Stuck waiting for ACK

笑着哭i 提交于 2019-12-25 08:09:46
问题 I am using https://github.com/Azure/azure-event-hubs/tree/master/c library which uses AMQP 1.0 protocol. When I send the first message to event hub via send project it gets stuck waiting for ACK. On my home PC it works fine. On my other PCs, even on Azure Virtual Machine - which is Windows Server 2012, it just waits for ACK in infinite loop. How can I solve this? 来源: https://stackoverflow.com/questions/40133998/amqp-stuck-waiting-for-ack

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

AMQP(RabbitMQ) Could not deserialize object, ClassNotFoundException

时光毁灭记忆、已成空白 提交于 2019-12-24 16:54:25
问题 I want to implement a RabbitMq(AMQP) messaging in java SpringBoot, but when I receive the message it says that the messaGE could not be deserialize because I the class for the object that I supposed to receive was not found even if I have that class int the classpath. RabbitMqListener.java: @EnableRabbit @Component public class RabbitMqListener { Logger logger = Logger.getLogger(RabbitMqListener.class); @RabbitListener(queues = "queue2") public void processQueue1(Product message) { logger

spring cloud stream 集成 spring-cloud-starter-stream-rabbit 程序突然报异常

落花浮王杯 提交于 2019-12-24 10:46:03
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 2019-12-20 22:09:30.736 TRACE [doorRecord.anonymous.0bb6ipBpS36_bcEKqcseBg-1] org.springframework.amqp.rabbit.connection.CachingConnectionFactory$CachedChannelInvocationHandler (1352) physicalClose - AMQChannel(amqp://guest@112.74.17.62:5672/,1) is already closed com.rabbitmq.client.AlreadyClosedException: connection is already closed due to clean connection shutdown; protocol method: #method<connection.close>(reply-code=200, reply-text=OK, class-id=0, method-id=0) at com.rabbitmq.client.impl.AMQChannel.processShutdownSignal(AMQChannel.java:401) ~[amqp

Spring RabbitTemplate is not creating dead letter queue with TTL

不羁的心 提交于 2019-12-24 03:31:44
问题 I am using spring-rabbit1.1 and RabbitMQ 3.3.1 , My spring configuration will create any queue with the help of RabbitTemplate on Rabbit MQ but if the queue has been configured with x-dead-letter-exchange and x-message-ttl , it just creates the queue with out the TTL and dead letter exchange. For Eg : the below queue will create the queue but TTL and dead letter exhange is not getting created . <rabbit:queue name="hello.queue.dead"> <rabbit:queue-arguments> <entry key="x-dead-letter-exchange"

Consume only N messages from RabbitMQ with react\stomp, ack them separately and then exit

怎甘沉沦 提交于 2019-12-24 03:25:09
问题 I am using RabbitMQ with PHP react\stomp. I have two queues - one is "todo" other is "done". Consumer reads from "todo", do its work, ACKs the message, then publishes it to the "done" queue. Is there any way of ensuring that I consume only N messages from "todo" (and ack them individually) and then quit? The main reason for that is we dont want to have long running consumers and we want to restart them after N messages. 回答1: You can set a prefetch count for a destination: The prefetch count