activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Gale <paul.n.g...@gmail.com>
Subject Re: Unsubscribing STOMP based durable topic subscribers in ActiveMQ 5.3.1?
Date Mon, 24 Jun 2013 14:18:31 GMT
Anyone have any thoughts on how to fix this issue on 5.3.1?

Thanks,
Paul


On Sun, Jun 23, 2013 at 6:07 PM, Paul Gale <paul.n.gale@gmail.com> wrote:

> However, I am using ActiveMQ 5.3.1 which I believe only supports STOMP
> 1.0. I thought that STOMP 1.1 support was only introduced in ActiveMQ
> 5.4.x? My situation is confined to dealing with 5.3.1, sadly.
>
> Thanks,
> Paul
>
>
> On Sun, Jun 23, 2013 at 5:16 PM, Christian Posta <
> christian.posta@gmail.com> wrote:
>
>> Paul,
>>
>> For STOMP 1.0, ActiveMQ will treat unsubscribes using subscriptionName ==
>> clientId.
>> If you try to unsubscribe with STOMP 1.1, it will work properly.
>>
>>
>> On Fri, Jun 21, 2013 at 11:54 AM, Paul Gale <paul.n.gale@gmail.com>
>> wrote:
>>
>> > Hi,
>> >
>> > (Yes, I know this version is ancient but it's still in use around here.
>> > We're in the process of upgrading to 5.8.0).
>> >
>> > Per the doc it states that it's a requirement for STOMP clients that
>> want
>> > to create durable topic subscription to ensure that the client-id and
>> > subscription name match. What's not clear from the documentation are the
>> > consequences when they don't!
>> >
>> > Failure to match does not appear to prevent either subscribing or
>> receiving
>> > messages. What it does prevent, however, is being able to unsubscribe
>> later
>> > on.
>> >
>> > When the subscriber tries to unsubscribe ActiveMQ rejects the attempt
>> with
>> > the error message "no durable subscription exists for: XXX".
>> >
>> > Using JMX to delete the subscription, via JConsole, or the web console
>> > (where JMX is enabled for both local and remote access), gives the same
>> > error.
>> >
>> > I verified this behavior by using telnet to connect to the broker's
>> STOMP
>> > port then issuing the following sequence of STOMP commands (as taken
>> from
>> > the STOMP based unit tests in the ActiveMQ source code):
>> >
>> >     CONNECT/SUBSCRIBE/DISCONNECT then CONNECT/UNSUBSCRIBE/DISCONNECT.
>> >
>> > Note: in ActiveMQ 5.8.0 I get the same error (for a non-matching durable
>> > subscription) when running the same STOMP commands via telnet (no
>> > surprise). However, I can delete the subscription via the web console.
>> >
>> > Once created in 5.3.1, how can this type of durable topic subscription
>> > (where the client-id and subscription name don't match) be removed?
>> >
>> > Thanks,
>> > Paul
>> >
>> >
>> > =======================================================================
>> >
>> > <beans xmlns="http://www.springframework.org/schema/beans"
>> >        xmlns:amq="http://activemq.apache.org/schema/core"
>> >        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> >        xsi:schemaLocation="http://www.springframework.org/schema/beans
>> >
>> > http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>> >                            http://activemq.apache.org/schema/core
>> >
>> > http://activemq.apache.org/schema/core/activemq-core-5.3.1.xsd">
>> >
>> >     <bean
>> >
>> >
>> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>> >       <property name="locations">
>> >         <value>file:${activemq.base}/conf/credentials.properties</value>
>> >       </property>
>> >     </bean>
>> >
>> >     <broker xmlns="http://activemq.apache.org/schema/core"
>> >       brokerName="localhost"
>> >       dataDirectory="${activemq.base}/data"
>> >       advisorySupport="false"
>> >       useJmx="true">
>> >
>> >       <managementContext>
>> >         <managementContext createConnector="false"/>
>> >       </managementContext>
>> >
>> >       <plugins>
>> >         <simpleAuthenticationPlugin>
>> >           <users>
>> >             <authenticationUser username="system" password="manager"
>> > groups="users,admins"/>
>> >           </users>
>> >         </simpleAuthenticationPlugin>
>> >       </plugins>
>> >
>> >       <persistenceAdapter>
>> >         <amqPersistenceAdapter syncOnWrite="false"
>> > directory="${activemq.base}/data"/>
>> >       </persistenceAdapter>
>> >
>> >       <systemUsage>
>> >         <systemUsage>
>> >           <memoryUsage>
>> >             <memoryUsage limit="20 mb"/>
>> >           </memoryUsage>
>> >         </systemUsage>
>> >       </systemUsage>
>> >
>> >       <transportConnectors>
>> >         <transportConnector name="stomp" uri="stomp://
>> > 0.0.0.0:61613?transport.closeAsync=false&amp;trace=true<http://0.0.0.0:61613?transport.closeAsync=false&trace=true>
>> "/>
>> >         <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
>> >       </transportConnectors>
>> >     </broker>
>> >
>> >     <import resource="jetty.xml"/>
>> > </beans>
>> >
>>
>>
>>
>> --
>> *Christian Posta*
>> http://www.christianposta.com/blog
>> twitter: @christianposta
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message