Hi, semantics of the destination names is not defined by the Stomp specification.
Regards -- Dejan Bosanac ----------------- FuseSource - The experts in open source integration and messaging. Email: dej...@fusesource.com Web: http://fusesource.com Twitter: http://twitter.com/dejanb ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net On Tue, Jan 25, 2011 at 10:26 AM, barroco <barr...@ebu.ch> wrote: > > Hi, > > I see, but it's not compliant with the stomp protocol and the problem is > that the topics /topic/subject/hello is not considered as > /topic/subject.hello .. So authorization doesn't work with subject with > several path depth because /topic/subject/hello/etc is single depth. > > > Best regards > > Michael > ________________________________________ > From: Dejan Bosanac [via ActiveMQ] [ > ml-node+3235738-483644461-209...@n4.nabble.com<ml-node%2b3235738-483644461-209...@n4.nabble.com> > ] > Sent: Tuesday, January 25, 2011 10:18 AM > To: Barroco, Michael > Subject: Re: Stomp Topic > > Hi, > > if you want to use topic://subject.hello in the broker, then your stomp > destination should be /topic/subject.hello > > See > > http://activemq.apache.org/stomp.html#Stomp-WorkingwithDestinationswithStomp > for > more details on the topic > > > Regards > -- > Dejan Bosanac > ----------------- > FuseSource - The experts in open source integration and messaging. > Email: [hidden email]</user/SendEmail.jtp?type=node&node=3235738&i=0> > Web: http://fusesource.com > Twitter: http://twitter.com/dejanb > ActiveMQ in Action - http://www.manning.com/snyder/ > Blog - http://www.nighttale.net > > > On Tue, Jan 25, 2011 at 8:13 AM, barroco <[hidden > email]</user/SendEmail.jtp?type=node&node=3235738&i=1>> wrote: > > > > > Hello, > > > > From several days, I'm working on the authentication and authorization > > topics for a stomp process. I identified a strange behavior. The topics > > with > > sub destinations (ie: /topic/subject/hello ) didn't seemed to be handled > by > > a virtual topic rule (ie: sub1.> ). > > > > It seems that the stomp topic is not properly converted by when it is > > handled by ActiveMQ and the topic ( /topic/subject/hello ) is considered > as > > "topic://subject/hello" and not as "topic://subject.hello" > > > > So i implemented an authorization broker to correct it in some cases > (maybe > > NOT ALL): > > > > public class MyAuthorizationBroker extends AuthorizationBroker { > > > > public MyAuthorizationBroker(Broker next, > > AuthorizationMap authorizationMap) { > > super(next, authorizationMap); > > } > > > > > > public void send(ProducerBrokerExchange producerExchange, Message > > messageSend) throws Exception { > > ActiveMQDestination dest = > > correctStompTopic(messageSend.getDestination()); > > messageSend.setDestination(dest); > > super.send(producerExchange, messageSend); > > } > > public Subscription addConsumer(ConnectionContext context, > ConsumerInfo > > info) throws Exception{ > > ActiveMQDestination dest = > correctStompTopic(info.getDestination()); > > info.setDestination(dest); > > return super.addConsumer(context, info); > > } > > public ActiveMQDestination correctStompTopic(ActiveMQDestination > > destination){ > > String aqdest = destination.getPhysicalName().replace('/', '.'); > > destination.setPhysicalName(aqdest); > > return destination; > > } > > } > > > > > > For my project, it seems to work, I hope this could be helpfull and I'm > > very > > interested if somebody find a best way to do it. > > > > Best regards > > > > michael > > > > PS: I created a new issue > > -- > > View this message in context: > > http://activemq.2283324.n4.nabble.com/Stomp-Topic-tp3235572p3235572.html > < > http://activemq.2283324.n4.nabble.com/Stomp-Topic-tp3235572p3235572.html?by-user=t > > > > Sent from the ActiveMQ - Dev mailing list archive at Nabble.com. > > > > > ________________________________ > If you reply to this email, your message will be added to the discussion > below: > http://activemq.2283324.n4.nabble.com/Stomp-Topic-tp3235572p3235738.html > To unsubscribe from Stomp Topic, click here< > http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3235572&code=YmFycm9jb0BlYnUuY2h8MzIzNTU3Mnw0MTM2NzI1MDk= > >. > ----------------------------------------- > ************************************************** > This email and any files transmitted with it > are confidential and intended solely for the > use of the individual or entity to whom they > are addressed. > If you have received this email in error, > please notify the system manager. > This footnote also confirms that this email > message has been swept by the mailgateway > ************************************************** > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Stomp-Topic-tp3235572p3235743.html > Sent from the ActiveMQ - Dev mailing list archive at Nabble.com. >