Author |
Message
|
alokjha |
Posted: Tue Jan 16, 2018 6:57 am Post subject: Wild charector in topic string |
|
|
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 |
|
![](templates/DAJ_Glass/images/spacer.gif) |
abhi_thri |
Posted: Tue Jan 16, 2018 7:12 am Post subject: |
|
|
![](images/avatars/3159673415d820d89ea89a.jpg) Knight
Joined: 17 Jul 2017 Posts: 516 Location: UK
|
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
alokjha |
Posted: Tue Jan 16, 2018 7:24 am Post subject: |
|
|
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 |
|
![](templates/DAJ_Glass/images/spacer.gif) |
PaulClarke |
Posted: Tue Jan 16, 2018 8:26 am Post subject: |
|
|
![](images/avatars/46729506851b1e76395b14.jpg) 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 |
|
![](templates/DAJ_Glass/images/spacer.gif) |
alokjha |
Posted: Tue Jan 16, 2018 8:52 am Post subject: |
|
|
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 |
|
![](templates/DAJ_Glass/images/spacer.gif) |
alokjha |
Posted: Tue Jan 16, 2018 10:24 am Post subject: |
|
|
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 |
|
![](templates/DAJ_Glass/images/spacer.gif) |
PaulClarke |
Posted: Tue Jan 16, 2018 1:44 pm Post subject: |
|
|
![](images/avatars/46729506851b1e76395b14.jpg) 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 |
|
![](templates/DAJ_Glass/images/spacer.gif) |
zpat |
Posted: Wed Jan 17, 2018 12:26 am Post subject: |
|
|
![](images/avatars/200698233754e3c3649f6d0.jpg) 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 |
|
![](templates/DAJ_Glass/images/spacer.gif) |
alokjha |
Posted: Fri Mar 23, 2018 2:00 am Post subject: |
|
|
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 |
|
![](templates/DAJ_Glass/images/spacer.gif) |
hughson |
Posted: Mon Mar 26, 2018 2:06 am Post subject: |
|
|
![](images/avatars/810794940518bb946528b3.jpg) Padawan
Joined: 09 May 2013 Posts: 1916 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 |
|
![](templates/DAJ_Glass/images/spacer.gif) |
|