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 IndexGeneral IBM MQ SupportCreate a Topic that has an Else Clause Subscriber.

Post new topicReply to topic
Create a Topic that has an Else Clause Subscriber. View previous topic :: View next topic
Author Message
RAN001
PostPosted: Tue Feb 16, 2021 10:15 am Post subject: Create a Topic that has an Else Clause Subscriber. Reply with quote

Novice

Joined: 14 Feb 2017
Posts: 11

IBM MQ 9.2 LUW

We are getting messages from SAP that we want to guarantee, never get lost. AKA always make it to a queue somewhere. This is a very simple example, but he have much more complex examples with many more subscriptions and complicated subscribers. We are using JMS and want to control things at the MQ server.

We have created a topic that we publish to:

Code:

DEFINE TOPIC(SAP.TRADE.EVENT.T) +
              TOPICSTR(SAP.TRADE.EVENT.T) +
              USEDLQ(YES) +
              REPLACE
DEFINE QLOCAL(SAP.TRADE.EVENT.V1.FXA.Q) +
              DEFPSIST(YES) +
              MAXDEPTH(250000) +
              REPLACE
DEFINE QLOCAL(SAP.TRADE.EVENT.NOMATCH.Q) +
              DEFPSIST(YES) +
              MAXDEPTH(1000) +
              REPLACE
DEFINE SUB(SAP.TRADE.EVENT.V1.FXA.SUB) +
              TOPICOBJ(SAP.TRADE.EVENT.T) +
              DEST(SAP.TRADE.EVENT.V1.FXA.Q) +
              SELECTOR('version=''V1'' AND messagefunction = ''FXA''') +
              SUBLEVEL(1) +
              REPLACE
DEFINE SUB(SAP.TRADE.EVENT.NOMATCH.SUB) +
              TOPICOBJ(SAP.TRADE.EVENT.T) +
              DEST(SAP.TRADE.EVENT.NOMATCH.Q) +
              SUBLEVEL(0) +
              REPLACE



We take the messagefunction out of the message. So if a new one of these ever shows up and we don't have a subscriber for it, we want it to preferably go to the SAP.TRADE.EVENT.NOMATCH.Q. (We will alarm if we get messages in this Q) If we can't figure this out, we would like it to go the DLQ as a potential last resort. We have tried the configuration above and as run above, no matter what we do, the message does not end up in the DLQ or the nomatch SUB. when the 'version=''V1'' AND messagefunction = ''BAD'' for example. Has anyone else done this?

I will say if we do delete the SAP.TRADE.EVENT.V1.FXA.SUB then a "BAD" message will end up in the NOMATCH.SUB.

Thanks in Advance,

Andy
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Tue Feb 16, 2021 2:30 pm Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2213
Location: Melbourne, Australia

Can you explain your reasons for using SUBLEVEL ?
_________________
Glenn


Last edited by gbaddeley on Wed Feb 17, 2021 1:49 pm; edited 1 time in total
Back to top
View user's profile Send private message
hughson
PostPosted: Tue Feb 16, 2021 3:11 pm Post subject: Reply with quote

Padawan

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

A SUBLEVEL(0) subscription should only get a publication message if none could be delivered to the SUBLEVEL(1) subscription(s).

It would appear that matching the topic, but not matching the selector counts as 'delivered'. This feels wrong to me, as I suspect it does to you.

Interestingly, in your scenario, if the publisher asks for MQPMO_WARN_IF_NO_SUBS_MATCHED it will be returned MQRC_NO_SUBS_MATCHED. This seems inconsistent with the above behaviour as it is not going down to the SUBLEVEL(0) subscriptions because it seems like it thinks it has matched something.

I would argue that if no SUBLEVEL(1) subscriptions were matched then the SUBLEVEL(0) should be sent the message.

I suspect you should ask IBM to look into this as this seems somewhat defective to me. Just my two cents.

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
RAN001
PostPosted: Wed Feb 17, 2021 7:25 am Post subject: Reply with quote

Novice

Joined: 14 Feb 2017
Posts: 11

Morag answered the sublevel question well, I am just providing the documentation to reference:

https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.2.0/com.ibm.mq.dev.doc/q026710_.htm
Quote:
A subscriber with a SubLevel of 0 is used as a catchall. It receives the publication if no final subscriber gets the message. A subscriber with SubLevel of 0 might be used to monitor the publications that no other subscribers received.



Thanks all for your help.

Andy
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexGeneral IBM MQ SupportCreate a Topic that has an Else Clause Subscriber.
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.