JMS
-
JMS
关键类,如下:jakarta.jms.ConnectionFactory
jakarta.jms.Connection
JmsTemplate
ActiveMQProperties
ActiveMQConnectionFactoryCustomizer
JmsListenerContainerFactory
DefaultJmsListenerContainerFactory
MessageConverter
DefaultJmsListenerContainerFactoryConfigurer
SpringBoot提供组件
spring-boot-starter-activemq
,应用程序可以和ActiveMQ通信。
相关的配置参数,样例如下:spring: activemq: broker-url: "tcp://192.168.1.210:9876" user: "admin" password: "secret" pool: enabled: true max-connections: 50 jms: cache: session-cache-size: 5
参数的说明,可参考ActiveMQProperties。
SpringBoot提供组件
spring-boot-starter-artemis
,应用程序可以和ActiveMQ Artemis通信。
相关的配置参数,样例如下:spring: artemis: mode: native broker-url: "tcp://192.168.1.210:9876" user: "admin" password: "secret" pool: enabled: true max-connections: 50 spring: jms: cache: session-cache-size: 5
参数的说明,可参考ActiveMQProperties。
参考资料
- JMS (Java Message Service)
Spring provides a JMS integration framework that simplifies the use of the JMS API.
- ActiveMQ Classic
The Tried and Trusted Open Source Message Broker
- ActiveMQ Classic The TCP Transport
- ActiveMQ Artemis
The Next Generation Message Broker by ActiveMQ.
AMQP
-
AMQP
AMQP即Advanced Message Queuing Protocol。
SpringBoot提供组件spring-boot-starter-amqp
,集成Spring AMQP,应用程序可以和RabbitMQ通信。
关键类,如下:CachingConnectionFactory
ConnectionNameStrategy
ConnectionFactoryCustomizer
RabbitTemplate
RabbitTemplateCustomizer
RabbitRetryTemplateCustomizer
RabbitTemplateConfigurer
AmqpTemplate
AmqpAdmin
RetryTemplate
MessageConverter
StreamMessageConverter
ProducerCustomizer
RabbitStreamTemplate
SimpleRabbitListenerContainerFactory
RabbitRetryTemplateCustomizer
RetryTemplate
RejectAndDontRequeueRecoverer
MessageRecoverer
关键注解,如下:
@RabbitListener
相关的配置参数,样例如下:
spring: rabbitmq: host: "localhost" port: 5672 username: "admin" password: "secret" addresses: "amqp://admin:secret@localhost" template: retry: enabled: true initial-interval: "2s"
参数的说明,可参考RabbitProperties。
参考资料
Kafka
-
Apache Kafka
关键类,如下:KafkaTemplate
KafkaTransactionManager
RecordMessageConverter
KafkaListenerContainerFactory
BatchMessageConverter
ChainedKafkaTransactionManager
关键注解,如下:
@KafkaListener
相关的配置参数,样例如下:
spring: kafka: bootstrap-servers: "localhost:9092" consumer: group-id: "myGroup"
参数的说明,可参考KafkaProperties。
参考资料
Apache Pulsar
-
关键类,如下:
PulsarClient
PulsarClientBuilderCustomizer
ReactivePulsarClient
PulsarAdministration
PulsarAdminBuilderCustomizer
PulsarTemplate
PulsarProducerFactory
ProducerBuilderCustomizer
TypedMessageBuilderCustomizer
ReactivePulsarTemplate
ReactivePulsarSenderFactory
ReactiveMessageSenderBuilderCustomizer
MessageSpecBuilderCustomizer
ReactivePulsarListenerContainerFactory
PulsarReaderFactory
ReaderBuilderCustomizer
ReactivePulsarReaderFactory
ReactiveMessageReaderBuilderCustomizer
关键注解,如下:
@PulsarListener
@ReactivePulsarListener
@PulsarReader
相关的配置参数,样例如下:
spring: pulsar: client: authentication: plugin-class-name: org.apache.pulsar.client.impl.auth.oauth2.AuthenticationOAuth2 param: issuerUrl: https://auth.server.cloud/ privateKey: file:///Users/some-key.json audience: urn:sn:acme:dev:my-instance
参数的说明,可参考
PulsarProperties
。
参考资料
- Apache Pulsar
- Spring for Apache Pulsar
- Pulsar Protocol URL
- Spring for Apache Pulsar文档
- Integration Properties
RSocket
-
RSocket is a binary protocol for use on byte stream transports. It enables symmetric interaction models through async message passing over a single connection.
SpringBoot提供组件
spring-boot-starter-rsocket
,集成spring-messaging,应用程序可以和rsocket通信。
参考资料
- rsocket
Application protocol providing Reactive Streams semantics