13a0c859bd
* BAEL-531: Hello World -Spring AMQP Project * Review Comments
35 lines
1.6 KiB
XML
35 lines
1.6 KiB
XML
<?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:context="http://www.springframework.org/schema/context"
|
|
xmlns:p="http://www.springframework.org/schema/p" xmlns:rabbit="http://www.springframework.org/schema/rabbit"
|
|
xmlns:c="http://www.springframework.org/schema/c" xmlns:util="http://www.springframework.org/schema/util"
|
|
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
|
|
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
|
|
http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit-1.4.xsd">
|
|
|
|
<rabbit:connection-factory id="connectionFactory" host="localhost" username="guest" password="guest" />
|
|
|
|
<rabbit:template id="amqpTemplate" connection-factory="connectionFactory"
|
|
exchange="myExchange" routing-key="foo.bar" />
|
|
|
|
<rabbit:admin connection-factory="connectionFactory" />
|
|
|
|
<rabbit:queue name="myQueue" />
|
|
|
|
<rabbit:topic-exchange name="myExchange">
|
|
<rabbit:bindings>
|
|
<rabbit:binding queue="myQueue" pattern="foo.*" />
|
|
</rabbit:bindings>
|
|
</rabbit:topic-exchange>
|
|
|
|
|
|
<rabbit:listener-container
|
|
connection-factory="connectionFactory">
|
|
<rabbit:listener ref="consumer" method="listen"
|
|
queue-names="myQueue" />
|
|
</rabbit:listener-container>
|
|
|
|
<bean id="consumer" class="com.baeldung.springamqp.consumer.Consumer" />
|
|
|
|
</beans> |