Skip to content

Instantly share code, notes, and snippets.

@swapnonil
Created February 24, 2013 19:57
Show Gist options
  • Save swapnonil/5025324 to your computer and use it in GitHub Desktop.
Save swapnonil/5025324 to your computer and use it in GitHub Desktop.
General Spring Publisher Config for Rabbit MQ. The rabbit:queue-arguments are not being used, as they did not work with Rabbit MQ 3.0.2 The HA /Mirror Queue Settings were set using the Rabbit MQ Management Console. Refer to http://www.rabbitmq.com/ha.html.
<?xml version="1.0" encoding="UTF-8"?>
<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"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit.xsd">
<rabbit:connection-factory id="connectionFactory" addresses="localhost:5672,localhost:5673" publisher-confirms="true"/>
<rabbit:template id="amqpTemplate" connection-factory="connectionFactory"/>
<rabbit:admin connection-factory="connectionFactory"/>
<rabbit:queue-arguments id="haArgs">
<entry key="x-ha-policy" value="all"/>
</rabbit:queue-arguments>
<rabbit:queue id="ha.queue" name="ha.queue-1"/>
</beans>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment