[jboss-user] [JBoss Messaging] - How to set up a durable subscriber?

janylj do-not-reply at jboss.com
Wed Jul 16 14:24:59 EDT 2008


Hello,

I am trying to establish publish-durable subscriber using JBoss Messaging 1.4.1.Beta1 and AS 4.2.2.GA.
Though I was able to publish messages to topic , my subscriber couldn't read the messages from topic. Are there any configurations to follow to setup durable subscriber?

destinations-service.xml:
   <mbean code="org.jboss.jms.server.destination.TopicService"
  |       name="jboss.messaging.destination:service=Topic,name=RemotehostDurableTopic"
  |       xmbean-dd="xmdesc/Topic-xmbean.xml">
  |       <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
  |       <depends>jboss.messaging:service=PostOffice</depends>
  |       <attribute name="SecurityConfig">
  |          <security>
  |             <role name="guest" read="true" write="true"/>
  |             <role name="publisher" read="true" write="true" create="false"/>
  |             <role name="durpublisher" read="true" write="true" create="true"/>
  |          </security>
  |       </attribute>
  |    </mbean>

I am using external Java clients (producers and consumers).
      Topic topic = (Topic) iniCtx.lookup("topic/RemotehostDurableTopic");
  |       TopicSession session = conn.createTopicSession(false, TopicSession.AUTO_ACKNOWLEDGE);
  |       TopicSubscriber recv = session.createDurableSubscriber(topic, "sub1");

Thank you very much.

Best,
Lijun


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4164828#4164828

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4164828



More information about the jboss-user mailing list