Commit e885dab7 authored by Phillip Webb's avatar Phillip Webb

Polish

parent 4c8c3768
...@@ -2939,6 +2939,8 @@ The Advanced Message Queuing Protocol (AMQP) is a platform-neutral, wire-level p ...@@ -2939,6 +2939,8 @@ The Advanced Message Queuing Protocol (AMQP) is a platform-neutral, wire-level p
for message-oriented middleware. The Spring AMQP project applies core Spring concepts to for message-oriented middleware. The Spring AMQP project applies core Spring concepts to
the development of AMQP-based messaging solutions. the development of AMQP-based messaging solutions.
[[boot-features-rabbitmq]] [[boot-features-rabbitmq]]
==== RabbitMQ support ==== RabbitMQ support
RabbitMQ is a lightweight, reliable, scalable and portable message broker based on the RabbitMQ is a lightweight, reliable, scalable and portable message broker based on the
...@@ -2956,13 +2958,14 @@ RabbitMQ configuration is controlled by external configuration properties in ...@@ -2956,13 +2958,14 @@ RabbitMQ configuration is controlled by external configuration properties in
spring.rabbitmq.password=secret spring.rabbitmq.password=secret
---- ----
See See {sc-spring-boot-autoconfigure}/amqp/RabbitProperties.{sc-ext}[`RabbitProperties`]
{sc-spring-boot-autoconfigure}/amqp/RabbitProperties.{sc-ext}[`RabbitProperties`]
for more of the supported options. for more of the supported options.
TIP: Check http://spring.io/blog/2010/06/14/understanding-amqp-the-protocol-used-by-rabbitmq/[Understanding AMQP, the protocol used by RabbitMQ] TIP: Check http://spring.io/blog/2010/06/14/understanding-amqp-the-protocol-used-by-rabbitmq/[Understanding AMQP, the protocol used by RabbitMQ]
for more details. for more details.
[[boot-features-using-amqp-sending]] [[boot-features-using-amqp-sending]]
==== Sending a message ==== Sending a message
Spring's `AmqpTemplate` and `AmqpAdmin` are auto-configured and you can autowire them Spring's `AmqpTemplate` and `AmqpAdmin` are auto-configured and you can autowire them
...@@ -2999,16 +3002,15 @@ Any `org.springframework.amqp.core.Queue` that is defined as a bean will be auto ...@@ -2999,16 +3002,15 @@ Any `org.springframework.amqp.core.Queue` that is defined as a bean will be auto
used to declare a corresponding queue on the RabbitMQ instance if necessary. used to declare a corresponding queue on the RabbitMQ instance if necessary.
[[boot-features-using-amqp-receiving]] [[boot-features-using-amqp-receiving]]
==== Receiving a message ==== Receiving a message
When the Rabbit infrastructure is present, any bean can be annotated with
When the Rabbit infrastructure is present, any bean can be annotated with `@RabbitListener` `@RabbitListener` to create a listener endpoint. If no `RabbitListenerContainerFactory`
to create a listener endpoint. If no `RabbitListenerContainerFactory` has been defined, a has been defined, a default one is configured automatically.
default one is configured automatically.
The following component creates a listener endpoint on the `someQueue` queue: The following component creates a listener endpoint on the `someQueue` queue:
[source,java,indent=0] [source,java,indent=0]
---- ----
@Component @Component
......
/* /*
* Copyright 2012-2013 the original author or authors. * Copyright 2012-2015 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment