> For the complete documentation index, see [llms.txt](https://jack80342.gitbook.io/spring-boot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jack80342.gitbook.io/spring-boot/iv.-spring-boot-features/32.-messaging/32.1.-jms.md).

# 32.1. JMS

`javax.jms.ConnectionFactory`接口提供标准的用于创建`javax.jms.Connection`的方法，`javax.jms.Connection`用于和JMS代理（broker）交互。 尽管Spring需要一个`ConnectionFactory`才能使用JMS，通常你不需要直接使用它，而是依赖于上层消息抽象（具体参考Spring框架的[相关章节](https://docs.spring.io/spring/docs/5.0.4.RELEASE/spring-framework-reference/integration.html#jms)），Spring Boot会自动配置发送和接收消息需要的设施（infrastructure）。
