ARTEMIS-4727 fix STOMP durable sub doc and property precedence
This commit is contained in:
parent
09dc445071
commit
ed59b0ea91
|
@ -261,12 +261,12 @@ public abstract class VersionedStompFrameHandler {
|
|||
String selector = frame.getHeader(Stomp.Headers.Subscribe.SELECTOR);
|
||||
String ack = frame.getHeader(Stomp.Headers.Subscribe.ACK_MODE);
|
||||
String id = frame.getHeader(Stomp.Headers.Subscribe.ID);
|
||||
String durableSubscriptionName = frame.getHeader(Stomp.Headers.Subscribe.DURABLE_SUBSCRIBER_NAME);
|
||||
String durableSubscriptionName = frame.getHeader(Stomp.Headers.Subscribe.DURABLE_SUBSCRIPTION_NAME);
|
||||
if (durableSubscriptionName == null) {
|
||||
durableSubscriptionName = frame.getHeader(Stomp.Headers.Subscribe.DURABLE_SUBSCRIPTION_NAME);
|
||||
}
|
||||
if (durableSubscriptionName == null) {
|
||||
durableSubscriptionName = frame.getHeader(Stomp.Headers.Subscribe.ACTIVEMQ_DURABLE_SUBSCRIPTION_NAME);
|
||||
durableSubscriptionName = frame.getHeader(Stomp.Headers.Subscribe.DURABLE_SUBSCRIBER_NAME);
|
||||
if (durableSubscriptionName == null) {
|
||||
durableSubscriptionName = frame.getHeader(Stomp.Headers.Subscribe.ACTIVEMQ_DURABLE_SUBSCRIPTION_NAME);
|
||||
}
|
||||
}
|
||||
RoutingType routingType = getRoutingType(frame.getHeader(Headers.Subscribe.SUBSCRIPTION_TYPE), frame.getHeader(Headers.Subscribe.DESTINATION));
|
||||
boolean noLocal = false;
|
||||
|
|
|
@ -208,10 +208,12 @@ The combination of these two headers will form the identity of the durable subsc
|
|||
To delete a durable subscription the `client-id` header must be set on the `CONNECT` frame and the `durable-subscription-name` must be set on the `UNSUBSCRIBE` frame.
|
||||
The values for these headers should match what was set on the `SUBSCRIBE` frame to delete the corresponding durable subscription.
|
||||
|
||||
Aside from `durable-subscription-name`, the broker also supports `durable-subscriber-name` (a deprecated property used before `durable-subscription-name`) as well as `activemq.subscriptionName` from ActiveMQ "Classic".
|
||||
Aside from `durable-subscription-name`, the broker also supports `durable-subscriber-name` (a deprecated property used before `durable-subscription-name`) as well as `activemq.subscriptionName` from ActiveMQ Classic.
|
||||
This is the order of precedence if the frame contains more than one of these:
|
||||
|
||||
1) `durable-subscriber-name` 2) `durable-subscription-name` 3) `activemq.subscriptionName`
|
||||
. `durable-subscription-name`
|
||||
. `durable-subscriber-name`
|
||||
. `activemq.subscriptionName`
|
||||
|
||||
It is possible to pre-configure durable subscriptions since the STOMP implementation creates the queue used for the durable subscription in a deterministic way (i.e. using the format of `client-id`.`subscription-name`).
|
||||
For example, if you wanted to configure a durable subscription on the address `myAddress` with a client-id of `myclientid` and a subscription name of `mysubscription` then configure the durable subscription:
|
||||
|
|
Loading…
Reference in New Issue