Hi,
I'm using spring-amqp within a distributed project which reads messages from a rabbitmq-server in a remote host. the network is very slow (and unreliable I think), but the message rate seems fine to me (till now!). the problem is that sometimes I see some strange behavior from one of the instances; the application stops reading messages from remote rabbitmq (when other instances are usually active);
here's the configuration for MessageListenerContainer ...
and the netstat result in this case :Code:final MessageListenerAdapter outgoingMessageListenerAdapter = new MessageListenerAdapter(outgoingMessageConsumer, outgoingMessageConverter); final SimpleMessageListenerContainer outgoingMessageListenerContainer = new SimpleMessageListenerContainer(); outgoingMessageListenerContainer.setConnectionFactory(connectionFactory); outgoingMessageListenerContainer.setQueueNames(serviceInfo.getOutgoingQueue()); outgoingMessageListenerContainer.setMessageListener(outgoingMessageListenerAdapter); outgoingMessageListenerContainer.setErrorHandler(errorHandler); outgoingMessageListenerContainer.setAcknowledgeMode(AcknowledgeMode.AUTO); outgoingMessageListenerContainer.setDefaultRequeueRejected(false); outgoingMessageListenerContainer.setConcurrentConsumers(serviceInfo.getOutgoingConsumerCount()); outgoingMessageListenerContainer.setRecoveryInterval(60000); // recovery when the connection has been lost! this.outgoingMessageListenerAdapter = outgoingMessageListenerContainer; outgoingMessageListenerContainer.start();
thanks in advanceCode:$ netstat -na | grep REMOTE_RABBIT_HOST tcp6 0 111096 192.168.0.10:55942 REMOTE_RABBIT_HOST:5672 ESTABLISHED
P.S: the Send-Q (111096 in the netstat sample) keeps unchanged, or reduces with a very low speed
P.P.S : restarting the application (the box which reads from the rabbit) usually solves the problem (not sure)



Reply With Quote