ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » MQPubSub Wild card character Issue

Post new topic  Reply to topic
 MQPubSub Wild card character Issue « View previous topic :: View next topic » 
Author Message
pshan81
PostPosted: Mon Oct 20, 2008 11:41 pm    Post subject: MQPubSub Wild card character Issue Reply with quote

Acolyte

Joined: 24 May 2005
Posts: 72

Hi,

I am getting the below error while using wildcard characters in an MQJMS pubsub java application.

javax.naming.NameNotFoundException: S*
at com.sun.jndi.fscontext.RefFSContext.getObjectFromBindings(RefFSContext.java:400)
at com.sun.jndi.fscontext.RefFSContext.lookupObject(RefFSContext.java:327)
at com.sun.jndi.fscontext.RefFSContext.lookup(RefFSContext.java:146)
at com.sun.jndi.fscontext.FSContext.lookup(FSContext.java:127)
at javax.naming.InitialContext.lookup(InitialContext.java:361)

I have created the below context structure and topics using JMSAdmin.I want to subscribe to topics Stock and Sport.
Context :pubsub
Sub Context:news
topics : TV,Stock,Sport & Film


However, I am getting the above error on

topic=(MQTopic)ctx.lookup("/pubsub/news/S*");
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Oct 21, 2008 1:25 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

That may well be because topic wild card chars are # and +
On the other hand if the topic has not been defined with a wildcard in JNDI you will not be able to retrieve with the wildcard, JNDI is not a DB you need the exact match
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
pshan81
PostPosted: Tue Oct 21, 2008 1:58 am    Post subject: Reply with quote

Acolyte

Joined: 24 May 2005
Posts: 72

Thanks for your reply saper.

I have changed the wildcard to # in my java application and created a topic with the name S# using JMSAdmin.Now the application has crossed executing the below line.However,its not subscribing to messages that are posted to the topic Sports or Stock.Am I doing anything wrong?

topic=(MQTopic)ctx.lookup("/pubsub/news/S#");
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Oct 21, 2008 3:07 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

It may be because the topic root usually does not start with a forward slash:

uri "topic://publish/news/Sports" really has a topic string of "publish/news/Sports" and not "/publish/news/Sports"
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
pshan81
PostPosted: Tue Oct 21, 2008 3:48 am    Post subject: Reply with quote

Acolyte

Joined: 24 May 2005
Posts: 72

Thanks saper

Do you mean the topic needs to be created like the below

topic=(MQTopic)ctx.lookup("pubsub/news/S#");

If so, even after doing the above change in the application we are not able to subscribe.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Oct 21, 2008 8:17 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

try subscribing with RFHUTIL and put the message to a test queue.
Find out why your subscribe message doesn't look like it

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MQPubSub Wild card character Issue
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.