Here I have a project that used Rabbitmq, and make a rabbitContext.xml file in project for spring integration.
But when I use Rabbitmq to do something like get message counts and get other information about my queue and connection,
I find that configure file help little.
below is my rabbitContext.xml
<rabbit:connection-factory id="connectionFactory" host="127.0.0.1" username="guest" password="guest" port="5672" />
<!--<rabbit:connection-factory id="connectionFactory"/>-->
<rabbit:admin connection-factory="connectionFactory"/>
<rabbit:queue id="test_queue" name="test_queue" durable="true" auto-delete="false" exclusive="false" />
<rabbit:direct-exchange name="test-mq-exchange" durable="true" auto-delete="false" id="test-mq-exchange">
<rabbit:bindings>
<rabbit:binding queue="test_queue" key="test_queue"/>
</rabbit:bindings>
</rabbit:direct-exchange>
<!--<rabbit:listener-container connection-factory="connectionFactory" acknowledge="auto">-->
<!--<rabbit:listener queues="test_queue" ref="messageListenerImpl"/>-->
<!--</rabbit:listener-container>-->
<rabbit:template exchange="test-mq-exchange" id="amqpTemplate" connection-factory="connectionFactory" message-converter="jsonMessageConverter" />
<bean id="jsonMessageConverter" class="org.springframework.amqp.support.converter.Jackson2JsonMessageConverter" />
the beans are ConnectionFactory, Queue and AmqpTemplate. And method amounts of those bean is too small.