Merge pull request #836 from microsoft/4.0.0-beta.3
sync beta3 to beta4
This commit is contained in:
Коммит
feebbf618b
|
@ -18,7 +18,7 @@
|
|||
<docs.main>spring-cloud-azure</docs.main>
|
||||
<main.basedir>${basedir}/..</main.basedir>
|
||||
<docs.whitelisted.branches>${project.version}</docs.whitelisted.branches>
|
||||
<configprops.inclusionPattern>spring.cloud.azure.*</configprops.inclusionPattern>
|
||||
<configprops.inclusionPattern>spring.jms.servicebus.*|spring.cloud.azure.*</configprops.inclusionPattern>
|
||||
<upload-docs-zip.phase>none</upload-docs-zip.phase>
|
||||
<generated-docs-multipage-output.dir>${project.build.directory}/generated-docs/${project.version}/reference/html</generated-docs-multipage-output.dir>
|
||||
<generated-docs-singlepage-output.dir>${project.build.directory}/generated-docs/${project.version}/reference/htmlsingle</generated-docs-singlepage-output.dir>
|
||||
|
|
|
@ -1109,5 +1109,30 @@
|
|||
|spring.cloud.azure.storage.resource-group | | Resource group the storage account belongs to. This is a legacy property.
|
||||
|spring.cloud.azure.subscription-id | | Subscription id to use when connecting to Azure resources. This is a legacy property.
|
||||
|spring.cloud.azure.tenant-id | | Tenant id for Azure resources. This is a legacy property.
|
||||
|spring.jms.servicebus.connection-string | | Connection string to connect to service bus.
|
||||
|spring.jms.servicebus.idle-timeout | `30m` | Connection idle timeout duration.
|
||||
|spring.jms.servicebus.listener.phase | | The phase in which this container should be started and stopped.
|
||||
|spring.jms.servicebus.listener.reply-pub-sub-domain | | Whether the reply destination type is topic. Only works for the bean of topicJmsListenerContainerFactory.
|
||||
|spring.jms.servicebus.listener.reply-qos-settings | | The QosSettings to use when sending a reply.
|
||||
|spring.jms.servicebus.listener.subscription-durable | `true` | Whether to make the subscription durable. Only works for the bean of topicJmsListenerContainerFactory.
|
||||
|spring.jms.servicebus.listener.subscription-shared | | Whether to make the subscription shared. Only works for the bean of topicJmsListenerContainerFactory.
|
||||
|spring.jms.servicebus.password | | Login password of the AMQP broker.
|
||||
|spring.jms.servicebus.pool.block-if-full | | Whether to block when a connection is requested and the pool is full. Set it to false to throw a 'JMSException' instead.
|
||||
|spring.jms.servicebus.pool.block-if-full-timeout | | Blocking period before throwing an exception if the pool is still full.
|
||||
|spring.jms.servicebus.pool.enabled | | Whether a JmsPoolConnectionFactory should be created, instead of a regular ConnectionFactory.
|
||||
|spring.jms.servicebus.pool.idle-timeout | | Connection idle timeout.
|
||||
|spring.jms.servicebus.pool.max-connections | | Maximum number of pooled connections.
|
||||
|spring.jms.servicebus.pool.max-sessions-per-connection | | Maximum number of pooled sessions per connection in the pool.
|
||||
|spring.jms.servicebus.pool.time-between-expiration-check | | Time to sleep between runs of the idle connection eviction thread. When negative, no idle connection eviction thread runs.
|
||||
|spring.jms.servicebus.pool.use-anonymous-producers | | Whether to use only one anonymous 'MessageProducer' instance. Set it to false to create one 'MessageProducer' every time one is required.
|
||||
|spring.jms.servicebus.prefetch-policy.all | `0` | Fallback value for prefetch option in this Service Bus namespace.
|
||||
|spring.jms.servicebus.prefetch-policy.durable-topic-prefetch | `0` | The number of prefetch for durable topic.
|
||||
|spring.jms.servicebus.prefetch-policy.queue-browser-prefetch | `0` | The number of prefetch for queue browser.
|
||||
|spring.jms.servicebus.prefetch-policy.queue-prefetch | `0` | The number of prefetch for queue.
|
||||
|spring.jms.servicebus.prefetch-policy.topic-prefetch | `0` | The number of prefetch for topic.
|
||||
|spring.jms.servicebus.pricing-tier | | Pricing tier for service bus namespace.
|
||||
|spring.jms.servicebus.remote-url | `amqp://localhost:5672` | URL of the AMQP broker. Auto-generated by default.
|
||||
|spring.jms.servicebus.topic-client-id | | Service bus topic client ID. Only works for the bean of topicJmsListenerContainerFactory.
|
||||
|spring.jms.servicebus.username | | Login user of the AMQP broker.
|
||||
|
||||
|===
|
|
@ -925,8 +925,7 @@ public class Demo {
|
|||
|com.azure.spring.autoconfigure.storage.resource.AzureStorageResourcePatternResolver|com.azure.spring.core.resource.AzureStorageFileProtocolResolver
|
||||
|===
|
||||
|
||||
==== From azure-spring-boot-starter-servicebus-jms to spring-cloud-azure-starter-servicebus-jms
|
||||
|
||||
|
||||
|
||||
|
||||
Configuration type for `spring.jms.servicebus.idle-timeout` changed from `long`(milliseconds) to `Duration` pattern for readability.
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ include::spring-data-support.adoc[]
|
|||
include::spring-security-support.adoc[]
|
||||
include::spring-integration-support.adoc[]
|
||||
include::spring-cloud-stream-support.adoc[]
|
||||
include::spring-jms-support.adoc[]
|
||||
include::kafka-support.adoc[]
|
||||
include::redis-support.adoc[]
|
||||
include::resource-manager.adoc[]
|
||||
|
|
|
@ -0,0 +1,130 @@
|
|||
[#spring-jms-support]
|
||||
== Spring JMS Support
|
||||
|
||||
To use Azure Service Bus by the JMS API integrated into the Spring JMS framework.
|
||||
Azure Service Bus connection string have to be provided which is to be parsed into the login username, password and remote URI for the AMQP broker.
|
||||
|
||||
=== Dependency Setup
|
||||
|
||||
Adding below dependencies if you want to migrate your Spring JMS application to use Azure Service Bus.
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<dependency>
|
||||
<groupId>com.azure.spring</groupId>
|
||||
<artifactId>spring-cloud-azure-starter-servicebus-jms</artifactId>
|
||||
</dependency>
|
||||
----
|
||||
|
||||
=== Configuration
|
||||
|
||||
.Configurable properties when using Spring JMS support
|
||||
[cols="2*",options="header"]
|
||||
|===
|
||||
|Property
|
||||
|Description
|
||||
|
||||
|*spring.jms.servicebus*.connection-string
|
||||
|Azure Service Bus connection string. Should be provided when want to provide the connection string directly.
|
||||
|
||||
|*spring.jms.servicebus*.topic-client-id
|
||||
|JMS clientID. Only works for the bean of topicJmsListenerContainerFactory.
|
||||
|
||||
|*spring.jms.servicebus*.idle-timeout
|
||||
| The duration for idle.
|
||||
|
||||
|*spring.jms.servicebus*.pricing-tier
|
||||
| The Azure Service Bus Price Tier.
|
||||
|
||||
|*spring.jms.servicebus*.listener.reply-pub-sub-domain
|
||||
| Whether the reply destination type is topic.
|
||||
|
||||
|*spring.jms.servicebus*.listener.phase
|
||||
| Specify the phase in which this container should be started and stopped.
|
||||
|
||||
|*spring.jms.servicebus*.listener.reply-qos-settings
|
||||
| Configure the QosSettings to use when sending a reply.
|
||||
|
||||
|*spring.jms.servicebus*.listener.subscription-durable
|
||||
| Whether to make the subscription durable. Only works for the bean of topicJmsListenerContainerFactory.
|
||||
|
||||
|*spring.jms.servicebus*.listener.subscription-shared
|
||||
| Whether to make the subscription shared. Only works for the bean of topicJmsListenerContainerFactory.
|
||||
|
||||
|*spring.jms.servicebus*.password
|
||||
| Login password of the AMQP broker
|
||||
|
||||
|
||||
| *spring.jms.servicebus*.pool.block-if-full
|
||||
|
|
||||
[[jms-servicebus-pool-configuration]] Whether to block when a connection is requested and the pool is full.
|
||||
|
||||
|*spring.jms.servicebus*.pool.block-if-full-timeout
|
||||
|Blocking period before throwing an exception if the pool is still full.
|
||||
|
||||
|*spring.jms.servicebus*.pool.enabled
|
||||
|Whether a JmsPoolConnectionFactory should be created, instead of a regularConnectionFactory.
|
||||
|
||||
|*spring.jms.servicebus*.pool.idle-timeout
|
||||
|Connection idle timeout.
|
||||
|
||||
|*spring.jms.servicebus*.pool.max-connections
|
||||
|Maximum number of pooled connections.
|
||||
|
||||
|*spring.jms.servicebus*.pool.max-sessions-per-connection
|
||||
|Maximum number of pooled sessions per connection in the pool.
|
||||
|
||||
|*spring.jms.servicebus*.pool.time-between-expiration-check
|
||||
|Time to sleep between runs of the idle connection eviction thread.
|
||||
|
||||
|*spring.jms.servicebus*.pool.use-anonymous-producers
|
||||
|Whether to use only one anonymous "MessageProducer" instance.
|
||||
|
||||
|*spring.jms.servicebus*.prefetch-policy.all
|
||||
| Fallback value for prefetch option in this Service Bus namespace.
|
||||
|
||||
|*spring.jms.servicebus*.prefetch-policy.durable-topic-prefetch
|
||||
| The number of prefetch for durable topic.
|
||||
|
||||
|*spring.jms.servicebus*.prefetch-policy.queue-browser-prefetch
|
||||
| The number of prefetch for queue browser.
|
||||
|
||||
|*spring.jms.servicebus*.prefetch-policy.queue-prefetch
|
||||
| The number of prefetch for queue.
|
||||
|
||||
|*spring.jms.servicebus*.prefetch-policy.topic-prefetch
|
||||
| The number of prefetch for topic.
|
||||
|
||||
|*spring.jms.servicebus*.remote-url
|
||||
| URL of the AMQP broker.
|
||||
|
||||
|*spring.jms.servicebus*.username
|
||||
| Login user of the AMQP broker.
|
||||
|===
|
||||
|
||||
NOTE: Spring JMS general configuration is omited for short.
|
||||
Please refer to link:https://docs.spring.io/spring-framework/docs/3.2.x/spring-framework-reference/html/jms.html[Spring JMS Doc] for more details.
|
||||
|
||||
=== Basic Usage
|
||||
|
||||
==== Use Service Bus Connection String
|
||||
|
||||
The simplest way to connect to Service Bus for Spring JMS application is with the connection string.
|
||||
|
||||
Add below properties and you are good to go.
|
||||
|
||||
[source,yaml]
|
||||
----
|
||||
spring:
|
||||
jms:
|
||||
servicebus:
|
||||
connection-string: ${AZURE_SERVICEBUS_CONNECTION_STRING}
|
||||
pricing-tier: ${PRICING_TIER}
|
||||
----
|
||||
|
||||
NOTE: The default enabled `ConnectionFactory` is the `CachingConnectionFactory` which adds Session caching as well MessageProducer caching. If you want to activate the connection pooling featured one of JmsPoolConnectionFactory, the property of `*spring.jms.servicebus*.pool.enabled` should be specified `true`. The other pooling configuration options(`*spring.jms.servicebus*.pool.*` prefix) can be found in the above
|
||||
<<jms-servicebus-pool-configuration, Configuration>> section.
|
||||
|
||||
=== Samples
|
||||
|
||||
Please refer to link:https://githu.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_{project-version}[azure-spring-boot-samples] for more details.
|
Загрузка…
Ссылка в новой задаче