Author |
Message
|
kishi_25 |
Posted: Mon Jan 05, 2015 11:48 am Post subject: Temporary disabling a MQ subscription |
|
|
Centurion
Joined: 19 Jul 2011 Posts: 100
|
Hi!
Is there anyway to temporarily disable the subscription so that the messages wont pile up in destination queue of the subscription. Currently We have the messages pile-up issue..due to some known issue..I'm looking for an option without deleting subscription, whether we can disable the subscription temporarily.
thanks |
|
Back to top |
|
 |
vsathyan |
Posted: Mon Jan 05, 2015 12:00 pm Post subject: |
|
|
Centurion
Joined: 10 Mar 2014 Posts: 121
|
No, there is no option to temporarily disable a subscription. You have to delete and recreate them. |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Jan 05, 2015 12:57 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
I suppose you could alter the topic object.
Quote: |
PUB
Controls whether messages can be published to this topic.
ASPARENT
Whether messages can be published to the topic is based on the setting of the closest parent administrative topic object in the topic tree.
ENABLED
Messages can be published to the topic (by suitably authorized applications).
DISABLED
Messages cannot be published to the topic. |
Quote: |
SUB
Controls whether applications are to be permitted to subscribe to this topic.
ASPARENT
Whether applications can subscribe to the topic is based on the setting of the closest parent administrative topic object in the topic tree.
ENABLED
Subscriptions can be made to the topic (by suitably authorized applications).
DISABLED
Applications cannot subscribe to the topic.
|
_________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
kishi_25 |
Posted: Tue Jan 06, 2015 8:01 am Post subject: |
|
|
Centurion
Joined: 19 Jul 2011 Posts: 100
|
Hi!
changing on topic will disable for all subscriptions.
I want to temporarily disable for specific subscription.
Looks like, there is an option in subscription - Request update
It has 2 values..1. All 2. Publish on request.
Default is All.
If you change it to Publish on request, messages are not coming to destination queue of the subscription. |
|
Back to top |
|
 |
kishi_25 |
Posted: Tue Jan 06, 2015 8:03 am Post subject: |
|
|
Centurion
Joined: 19 Jul 2011 Posts: 100
|
Also, I'm trying to understand more on, for what scenario the messages will come for publish on request. |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Jan 06, 2015 8:13 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
kishi_25 wrote: |
changing on topic will disable for all subscriptions.
I want to temporarily disable for specific subscription. |
So, what you really want is to somehow disable an individual subscribing application (or user?), NOT all subscribers to the topic. Is this correct?
If so, I suspect that you will need to disable the subscribing application. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
hughson |
Posted: Tue Jan 06, 2015 9:24 am Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
kishi_25 wrote: |
Also, I'm trying to understand more on, for what scenario the messages will come for publish on request. |
If you make a publish on request subscription, then you will only get a publication message when you issue the MQ API verb MQSUBREQ.
Cheers
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
hughson |
Posted: Tue Jan 06, 2015 9:26 am Post subject: Re: Temporary disabling a MQ subscription |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
kishi_25 wrote: |
Hi!
Is there anyway to temporarily disable the subscription so that the messages wont pile up in destination queue of the subscription. Currently We have the messages pile-up issue..due to some known issue..I'm looking for an option without deleting subscription, whether we can disable the subscription temporarily.
thanks |
One way might be to PUT(DISABLE) the queue associated with the subscription and then make sure that the TOPIC is defined to not care when it can't put the messages to subscriber queues. The NPMSGDLV and PMSGDLV attributes control this. However, beware that this would also mean any other subscriptions that cannot receive their messages for another reason, e.g. queue full would also be ignored.
Cheers
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
kishi_25 |
Posted: Tue Jan 06, 2015 11:11 am Post subject: |
|
|
Centurion
Joined: 19 Jul 2011 Posts: 100
|
[quote="hughson"]
kishi_25 wrote: |
Also, I'm trying to understand more on, for what scenario the messages will come for publish on request. |
If you make a publish on request subscription, then you will only get a publication message when you issue the MQ API verb MQSUBREQ.
Currently my scenario is I have topic, and the subscription defined with destination as queue. A message flow will read the subscription messages from destination queues and process them.
With keeping "publish on request" option, I'm not getting messages into destination queue. As you are specifying, how and where should I specify for MQ API Verb MQSUBREQ. does it has to be coded from the ESQL of message broker? |
|
Back to top |
|
 |
hughson |
Posted: Wed Jan 07, 2015 3:26 am Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
kishi_25 wrote: |
Currently my scenario is I have topic, and the subscription defined with destination as queue. A message flow will read the subscription messages from destination queues and process them.
With keeping "publish on request" option, I'm not getting messages into destination queue. As you are specifying, how and where should I specify for MQ API Verb MQSUBREQ. does it has to be coded from the ESQL of message broker? |
I'm not convinced that scenario is going to work. Your message flow is presumably kicked off by messages arriving on your destination queue. So that would not be the place to issue MQSUBREQ because it wouldn't be called until messages arrive, and messages would only arrive after you've called MQSUBREQ. I don't believe Sub Request is the correct solution for you.
From your description is sounds like you want to have some messages that are published, and then pause the stream of messages coming to you, and then later, start reading them again. This sounds like you don't need to receive every message that is published, i.e. gaps in the published stream is OK for your application? If so, I suggest you simply remove the subscription at the time you wish to pause the flow of messages, and then recreate it when you are ready to receive the messages again.
Cheers
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
kishi_25 |
Posted: Wed Jan 07, 2015 8:58 am Post subject: |
|
|
Centurion
Joined: 19 Jul 2011 Posts: 100
|
Hi!
My requirement is - Currently the consuming message flow is having some issue and hence it can't process the messages from destination queue of the subscription. Hence, I want to temporarily disable the subscription so that messages won't pile up on destination queue.
For this requirement, if I use the option of "Publish on request", on Subscription, the messages are not coming to destination queue.
Once, the message flow issue is resolved, I can set the option back as "Publish all" so that the messages can start coming back to destination queue.
I have tested this and its working.
I'm fine without using MQSUBREQ option
Do you see any issues, with this setup? |
|
Back to top |
|
 |
hughson |
Posted: Thu Jan 08, 2015 3:01 am Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
Never thought of that - if it works, then great!
Cheers
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
|