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 » General IBM MQ Support » Wild charector in topic string

Post new topic  Reply to topic
 Wild charector in topic string « View previous topic :: View next topic » 
Author Message
alokjha
PostPosted: Tue Jan 16, 2018 6:57 am    Post subject: Wild charector in topic string Reply with quote

Novice

Joined: 12 Dec 2014
Posts: 16
Location: India

Dear All,

Happy New Year...

I am trying to subscribe some set of topic strings named as Sub_a, Sub_b, Sub_c.
I used TOPICSTR as Sub# so that all messages could be subscribed by one queue.
DEFINE SUB(TEST) TOPICSTR('Sub#') DEST(TEST)
But it seems Sub# is getting treated as ordinary characters.
I tried several other options too but no luck.
Please suggest me on this scenario.

Thanks


Last edited by alokjha on Tue Jan 16, 2018 7:27 am; edited 1 time in total
Back to top
View user's profile Send private message
abhi_thri
PostPosted: Tue Jan 16, 2018 7:12 am    Post subject: Reply with quote

Knight

Joined: 17 Jul 2017
Posts: 516
Location: UK

Hi Alok,
Can you try TOPICSTR('Sub*') and see

# shouldn't be mixed with other characters when defining topic string, see 'When topic-based wildcards are not wild' at infocenter,

https://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.pro.doc/q005020_.htm#q005020___nw

Regards, Abhi
Back to top
View user's profile Send private message
alokjha
PostPosted: Tue Jan 16, 2018 7:24 am    Post subject: Reply with quote

Novice

Joined: 12 Dec 2014
Posts: 16
Location: India

Hi Abhi,

I had already tried this. I re-tried and still its not subscribed
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Tue Jan 16, 2018 8:26 am    Post subject: Reply with quote

Grand Master

Joined: 17 Nov 2005
Posts: 1002
Location: New Zealand

MQ supports two types of wildcards - TOPIC based and CHARACTER based.

I am not an expert in Pub/Sub but my understanding is that TOPIC based essentially allows you to wildcard at the TOPIC boundaries ie. topic strings always have structure. TOPIC based subscriptions use # and + wildcard characters.

Whereas character base subscription use wildcard characters * and ? and have no such structure.

In your case you seem to want to just treat the topic string as a string and wildcard anywhere so I would agree that you should use TOPICSTR('Sub*') but you also need to ensure that the subscription has WSCHEMA( CHAR ).

The MQ manuals contain a much better and more accurate description of the difference between the two schemes.

Cheers,

Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
alokjha
PostPosted: Tue Jan 16, 2018 8:52 am    Post subject: Reply with quote

Novice

Joined: 12 Dec 2014
Posts: 16
Location: India

Hi Paul,

Thanks a lot!
Yes we have two types of usage of Wildcard:
Wildcard usage: Character level wildcard
Wildcard usage: Topic level wildcard --> Its by-default property

I used this,
DEFINE SUB(TEST) TOPICSTR('Sub*') DEST(TEST) WSCHEMA(CHAR)
and it worked and subscribed all topis strings which starts with Sub.

Thanks
Back to top
View user's profile Send private message
alokjha
PostPosted: Tue Jan 16, 2018 10:24 am    Post subject: Reply with quote

Novice

Joined: 12 Dec 2014
Posts: 16
Location: India

Hi Paul,

Do you know the corresponding[WSCHEMA(CHAR) used in mqsc] attribute/field/object used while creating character level wild card subscription through RfhUtil tool?

Thanks
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Tue Jan 16, 2018 1:44 pm    Post subject: Reply with quote

Grand Master

Joined: 17 Nov 2005
Posts: 1002
Location: New Zealand

Hi,

I am sorry but I don't use RfhUtil so no I don't. If I wanted to make a programmatic subscription I would use Q. In Q the option is -SC for Character wildcards.

Alternatively, if I were just wanting to play with the options and see what happens then I'd use the API Exerciser in MO71.

Cheers,

Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
zpat
PostPosted: Wed Jan 17, 2018 12:26 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

Before you implement any pub/sub application - spend some time designing your topic tree.

Remember the topic tree is shared by all applications - so give it some structure so that different parts of the business and different applications don't try to use the same part of the topic string unless they intend to.

For example use

/company/function/application

not just

/application

It may be a good idea to use all lower case to avoid case mixing in the string.

Set up some topic objects to allow OAM security control at the different points on the tree so that you can isolate applications from each other.
_________________
Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
Back to top
View user's profile Send private message
alokjha
PostPosted: Fri Mar 23, 2018 2:00 am    Post subject: Reply with quote

Novice

Joined: 12 Dec 2014
Posts: 16
Location: India

Thanks a lot zpat.
Actually I want to subscribe messages from WMB v6 by using Character level wildcard
I am unable to find options there though I could see same in later version.
Can we do the same in WMBv6 too?
Back to top
View user's profile Send private message
hughson
PostPosted: Mon Mar 26, 2018 2:06 am    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
Location: Bay of Plenty, New Zealand

alokjha wrote:
Actually I want to subscribe messages from WMB v6 by using Character level wildcard
I am unable to find options there though I could see same in later version.
Can we do the same in WMBv6 too?

When MQ V7 Pub/Sub was created, the two wildcard schemes that have been discussed in this thread came about because Message Broker did it one way (topic based wildcards with # and +) and MQ V6 Queued Pub/Sub did it another way (character based wildcards with * and ?).

MQ V7 going forward was to be the Pub/Sub engine for both MQ and Message Broker based applications, and so it had to support both schemes.

For this reason, I do not believe you can use character based wildcards in Message Broker in releases earlier than those which make use of MQ V7 as the Pub/Sub engine.

Cheers,
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Wild charector in topic string
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.