Skip to content

Instantly share code, notes, and snippets.

@patelm5
Last active December 11, 2015 02:38

Revisions

  1. patelm5 revised this gist Jan 14, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.xml
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    21xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    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"
    xsi:schemaLocation="http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit-1.1.xsd
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
  2. patelm5 created this gist Jan 14, 2013.
    30 changes: 30 additions & 0 deletions gistfile1.xml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    21xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:rabbit="http://www.springframework.org/schema/rabbit" xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit-1.1.xsd
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

    <rabbit:connection-factory id="connectionFactory" host="${rabbitmq.host:localhost}" port="${rabbitmq.port:5672}"
    username="guest" password="guest" connection-factory="rcf" />

    <bean id="rcf" class="com.rabbitmq.client.ConnectionFactory">
    <property name="host" value="${rabbitmq.host:localhost}"/>
    <property name="requestedHeartbeat" value="10" />
    </bean>

    <rabbit:template id="amqpTemplate" connection-factory="connectionFactory" reply-timeout="20000" />

    <rabbit:admin connection-factory="connectionFactory" />

    <rabbit:queue name="BroadcastQueue" >
    <rabbit:queue-arguments value-type="java.lang.Long">
    <entry key="x-message-ttl" value="2400000" />
    </rabbit:queue-arguments>
    </rabbit:queue>

    <rabbit:listener-container connection-factory="connectionFactory">
    <rabbit:listener queues="BroadcastQueue" ref="broadcastQueueConsumer" />
    </rabbit:listener-container>

    </beans>