I’m trying to write a topic with durable subscriber. I got my basic topic:
<?xml version="1.0" encoding="UTF-8"?>
<server>
<mbean code="org.jboss.jms.server.destination.TopicService" name="jboss.messaging.destination:service=Topic,name=durableTopic" xmbean-dd="xmdesc/Topic-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
<depends>jboss.messaging:service=PostOffice</depends>
</mbean>
</server>
And I got my subscribing MDB:
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "topic/durableTopic"),
@ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue = "Durable") })
public class DurableSubscriberOne implements MessageListener {
// ...
But when I enter jmx-console or admin-console I see my topic with one non-durable subscription and no durable subscriptions.
Am I making some typo or some minor mistake, or is it more tricky than that? I’m using JBoss 5.1.0.GA.
Having had the same problem, I eventually managed to make the MDB create a durable subscription by adding two more @ActivationConfigProperty: