[rabbitmq-discuss] RabbitMQ and Spring

Arno Puschmann arno.puschmann at acodeas.de
Wed Aug 3 11:13:40 BST 2011


Thanks, this has solved my problem. Now I use the Spring AMQP Version 1.0.0.0RC2 and RabbitClient 2.5.1. But now I have another questions.

Is there a possibility to set the ReplyTimeout for the template.receive function? The template.setReplyTimeout is only for the template.sendAndReceive function. But I need different Queues for sending an receiving. By the way template.sendAndReceive isn't working anyway for me. In addition my Queue is auto-delete and not durable, but it isn't deleted after the last message is read. At the Moment I have something like this.

	Thread.sleep(3000);
	Message message_response = template.receive("somequeue");
	admin.deleteQueue("somequeue", true, true);

The other thing ist the bean defintion. If I declare my Queues, Exchanges and MessageListener with the rabbit-Namespace like this 

<rabbit:queue name="queue1" durable="true" />

My IDE (SpringSource Tool Suite - Eclipse) shows my folliwing error:

Multiple annotations found at this line:
	- schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/
	 rabbit/spring-rabbit.xsd', because 1) could not find the document; 2) the document could not be read; 3) 
	 the root element of the document is not <xsd:schema>.
	- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for 
	 element 'rabbit:queue'.

My Schema definition:

<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:rabbit="http://www.springframework.org/schema/rabbit"
  xmlns:context="http://www.springframework.org/schema/context"
  xmlns:sws="http://www.springframework.org/schema/web-services"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  http://www.springframework.org/schema/web-services http://www.springframework.org/schema/web-services/web-services-2.0.xsd
  http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
  http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit.xsd">

I get no compilation error, but these errors are very annoying.

I found this thread but there is not acceptable solution

http://stackoverflow.com/questions/6746014/where-is-the-spring-rabbit-xsd-schema-location-for-the-rabbit-namespace

I tried to copy a xsd to my workspace but in xsd is no possiblity to define a schema file on a relative path.

Have somebody similiar problems?

Thanks.


More information about the rabbitmq-discuss mailing list