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 IndexWebSphere Message Broker SupportIBM MQ 8.0.0.5 Subscriber Issue

Post new topicReply to topic
IBM MQ 8.0.0.5 Subscriber Issue View previous topic :: View next topic
Author Message
riyaz_tak
PostPosted: Fri Nov 13, 2020 5:28 am Post subject: IBM MQ 8.0.0.5 Subscriber Issue Reply with quote

Voyager

Joined: 05 Jan 2012
Posts: 92

Hi All,

IBM MQ 8.0.0.5
OS : Solaris 10
Java 8

We have created one administrator subscriber which is durable and expiry is unlimited.

dis sub(':private:123:TOPIC01')
23 : dis sub(':private:123:TOPIC01')
AMQ8096: WebSphere MQ subscription inquired.
SUBID(xxxxxxx)
SUB(:private:123:TOPIC01') TOPICSTR(TOPIC01)
TOPICOBJ( ) DISTYPE(RESOLVED)
DEST(SYSTEM.MANAGED.DURABLE.xxxxx)
DESTQMGR(xxxxx) PUBAPPID( )
SELECTOR( ) SELTYPE(NONE)
USERDATA( )
PUBACCT(xxxx)
DESTCORL(xxxx)
DESTCLAS(MANAGED) DURABLE(YES)
EXPIRY(UNLIMITED) PSPROP(MSGPROP)
PUBPRTY(ASPUB) REQONLY(NO)
SUBSCOPE(ALL) SUBLEVEL(1)
SUBTYPE(ADMIN) VARUSER(ANY)
WSCHEMA(TOPIC) SUBUSER(mqm)
CRDATE(2020-11-13) CRTIME(12:38:26)
ALTDATE(2020-11-13) ALTTIME(12:38:26)

But when client connects to IBM MQ then it modify subscriber .

dis sub(':private:123:TOPIC01')
37 : dis sub(':private:123:TOPIC01')
AMQ8096: WebSphere MQ subscription inquired.
SUBID(xxxx)
SUB(:private:123:TOPIC01) TOPICSTR(TOPIC01)
TOPICOBJ(SYSTEM.BASE.TOPIC) DISTYPE(RESOLVED)
DEST(SYSTEM.MANAGED.NDURABLE.xxx)
DESTQMGR(xxxx) PUBAPPID( )
SELECTOR( ) SELTYPE(NONE)
USERDATA(000)
PUBACCT(xxx)
DESTCORL(xxx)
DESTCLAS(MANAGED) DURABLE(NO)
EXPIRY(UNLIMITED) PSPROP(MSGPROP)
PUBPRTY(ASPUB) REQONLY(NO)
SUBSCOPE(ALL) SUBLEVEL(1)
SUBTYPE(API) VARUSER(FIXED)
WSCHEMA(TOPIC) SUBUSER(xxx)
CRDATE(2020-11-13) CRTIME(10:12:39)
ALTDATE(2020-11-13) ALTTIME(10:12:39)


Some values are getting changed and one of them is EXPIRY (becoming 0 ) and Durable becoming NO so because of that subscriber becomes non durable and delete itself when client program exists.

How to make admin created sub unmodifiable ?
Client is using .net core code to access subscriber which we don't have access to.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Nov 13, 2020 9:11 am Post subject: Reply with quote

Grand High Poobah

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

Define/restrict access to the TOPIC01 object so that the .net user can subscribe but not modify...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
riyaz_tak
PostPosted: Fri Nov 13, 2020 11:42 am Post subject: Reply with quote

Voyager

Joined: 05 Jan 2012
Posts: 92

I tried to restrict access to the topic

setmqaut -m xxx -t topic -n TOPIC01-p user1 +sub

but still client program changed the property of administratively created subscriber.

How exactly to do so ?
Back to top
View user's profile Send private message
riyaz_tak
PostPosted: Fri Nov 13, 2020 12:09 pm Post subject: Reply with quote

Voyager

Joined: 05 Jan 2012
Posts: 92

I read about below property cleanSession :

Quote:
If you use the default MqttConnectOptions, or set MqttConnectOptions.cleanSession to true before connecting the client, any old subscriptions for the client are removed when the client connects. Any new subscriptions the client makes during the session are removed when it disconnects.


How to set it administratively?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Nov 13, 2020 3:20 pm Post subject: Reply with quote

Grand High Poobah

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

riyaz_tak wrote:
I read about below property cleanSession :

Quote:
If you use the default MqttConnectOptions, or set MqttConnectOptions.cleanSession to true before connecting the client, any old subscriptions for the client are removed when the client connects. Any new subscriptions the client makes during the session are removed when it disconnects.


How to set it administratively?

Now we're moving forward. You're using mqtt. So what are your options for setting MqttConnectOptions ? I believe the cleanSession might be a default. Try using something else...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
riyaz_tak
PostPosted: Fri Nov 13, 2020 9:29 pm Post subject: Reply with quote

Voyager

Joined: 05 Jan 2012
Posts: 92

I need to set it administratively.

I think MqttConnectOptions is an API and I am not looking to do it programmatically.
As I said sub should be unmodifiable and I gave only +sub permission to topic .
How to restrict or make sub unmodifiable ?
Back to top
View user's profile Send private message
riyaz_tak
PostPosted: Sun Nov 15, 2020 8:49 am Post subject: Reply with quote

Voyager

Joined: 05 Jan 2012
Posts: 92

I removed authorization also and only gave sub :

setmqaut -m qm1 -t topic -n TOPIC01 -p xxx -pub

setmqaut -m qm1 -t topic -n TOPIC01 -p xxx +sub

but still client can alter subscriber .Why is it so? I am creating managed durable subscriber with expiry(unlimited) and durable(yes) .

Is it the default behaviour and if so then how can i make sure that subscriber remains durable (expiry and durable fields remains unaltered)

We are using AMQP protocol to communicate.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Nov 16, 2020 9:14 am Post subject: Reply with quote

Grand High Poobah

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

riyaz_tak wrote:
I need to set it administratively.

I think MqttConnectOptions is an API and I am not looking to do it programmatically.
As I said sub should be unmodifiable and I gave only +sub permission to topic .
How to restrict or make sub unmodifiable ?


The MqttConnectOptions are set by the subscriber when he / she / it connects.
You should may be look into those.

As an alternative you could set up a more specific administrative subscription and let the MQTT subscribe to a more generic one. So there'd be no harm done if the more generic one is added/removed...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
riyaz_tak
PostPosted: Mon Nov 16, 2020 9:20 am Post subject: Reply with quote

Voyager

Joined: 05 Jan 2012
Posts: 92

Client is using .net core api and we can't force them to use mqtt api.
I gave only sub authorization on the topic.
What exactly do you mean by specific administrative subscription?
I made it durable and expiry is unlimited.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Nov 16, 2020 9:36 am Post subject: Reply with quote

Grand High Poobah

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

riyaz_tak wrote:
Client is using .net core api and we can't force them to use mqtt api.
I gave only sub authorization on the topic.
What exactly do you mean by specific administrative subscription?
I made it durable and expiry is unlimited.


Say your mqtt subscription topic is /Sports/scores/mqtt/#
but you publish to /Sports/scores/mqtt/admin
So your admin subscription would be on /Sports/scores/mqtt/admin

So when the mqtt subscription gets removed the admin one is unchanged.

You could also do the opposite and have a more generic admin subscription and a more specific mqtt one... You'd just need to make sure the mqtt client can never subscribe to the same subscription as the admin one.

Hope this helps.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
riyaz_tak
PostPosted: Mon Nov 16, 2020 10:56 am Post subject: Reply with quote

Voyager

Joined: 05 Jan 2012
Posts: 92

Thanks A lot.

One question.

Quote:
So when the mqtt subscription gets removed the admin one is unchanged.


Suppose mqtt subscription gets removed and now publisher sends messages to /Sports/scores/mqtt/admin so messages will go to to all the topics but how subscription topic /Sports/scores/mqtt/# will get the messages when it connects to topic once again ?

I understand /Sports/scores/mqtt will have all the message but how to transfer it to /Sports/scores/mqtt/# when it reconnects ?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Nov 17, 2020 5:20 am Post subject: Reply with quote

Grand High Poobah

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

riyaz_tak wrote:
Thanks A lot.

One question.

Quote:
So when the mqtt subscription gets removed the admin one is unchanged.


Suppose mqtt subscription gets removed and now publisher sends messages to /Sports/scores/mqtt/admin so messages will go to to all the topics but how subscription topic /Sports/scores/mqtt/# will get the messages when it connects to topic once again ?

I understand /Sports/scores/mqtt will have all the message but how to transfer it to /Sports/scores/mqtt/# when it reconnects ?

Because mqtt will need to subscribe to Sports/scores/mqtt/# ...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
riyaz_tak
PostPosted: Tue Nov 17, 2020 6:00 am Post subject: Reply with quote

Voyager

Joined: 05 Jan 2012
Posts: 92

Yes mqtt has to.

But consider a scenario where mqtt finishes its processing so it's no longer subscribed to /Sports/scores/mqtt/# .Now publishers sends messages and at this point mqtt is not subscribed to /Sports/scores/mqtt/#.

After sometime it begins it's exaction but mqtt won't receive those messages which were sent when it was offline.

am I correct? if not then please let me know why.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Nov 18, 2020 8:04 am Post subject: Reply with quote

Grand High Poobah

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

riyaz_tak wrote:
Yes mqtt has to.

But consider a scenario where mqtt finishes its processing so it's no longer subscribed to /Sports/scores/mqtt/# .Now publishers sends messages and at this point mqtt is not subscribed to /Sports/scores/mqtt/#.

After sometime it begins it's exaction but mqtt won't receive those messages which were sent when it was offline.

am I correct? if not then please let me know why.


You're correct, unless publications are retained.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportIBM MQ 8.0.0.5 Subscriber 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.