[jboss-user] [Messaging, JMS & JBossMQ] - Initial durable subscription setup

npujol do-not-reply at jboss.com
Wed Dec 6 20:14:54 EST 2006


Hi, 

I was wondering if it was wrong to insert a row manually in theJMS_SUBSCRIPTIONS at table creation time in order to register a durable subscription? In my mysql-jdbc-state-service.xml:

<attribute name="SqlProperties">
  |      ....
  |       POPULATE.TABLES.01 = INSERT INTO JMS_SUBSCRIPTIONS (CLIENTID, SUBNAME, TOPIC, SELECTOR) VALUES ("_ownsubscriber", "_emailSender0","NotificationDurableTopic","subscribers like '%email%'")
  |      ....
  | </attribute>

I think it is not - I am basically mimicing a managed topic just like it would be done in a jbossmq-state.xml with something like this:


  | <DurableSubscription>
  |     			<ClientID>_ownsubscriber</ClientID>
  |      			<Name>_emailSender0</Name>
  |      			<TopicName>NotificationDurableTopic</TopicName>
  | 			<Selector>subscribers like '%email%'</Selector>
  | </DurableSubscription>

It is my understanding that both ways of doing it basically relieve the JMS client code from having to specify the client id and subscription name on their durable subscriptions. In my environment it does seem to work though the jbossmq's client subscriber code 

  | topicSession.createDurableSubscriber(topic,"_emailSend0"); 

insists in adding a new row to JMS_SUBSCRIPTIONS and my JMS_SUBSCRIPTIONS table ends up looking like this:


  | +----------------+---------------+-----------------------------+----------------------------+
  | | CLIENTID       | SUBNAME       | TOPIC                       | SELECTOR             |
  | +----------------+---------------+-----------------------------+----------------------------+
  | | _ownsubscriber | _emailSender0 | NotificationDurableTopic | subscribers like '%email%' |
  | | ID:2           | _emailSender0 | NotificationDurableTopic | NULL             |
  | +----------------+---------------+-----------------------------+----------------------------+
  | 

It looks like I am missing a piece in my setup : I must associate the user with the connection as is done in jbossmq-state.xml by matching the User  node with the durable subscription  node. Does anybody know if it is even possible to create this association with a jboss-jdbc-state-service.xml DB setup? Thanks in advance

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

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



More information about the jboss-user mailing list