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 » IBM MQ Java / JMS » Sample MQPubSubApiSample throws RC 2085

Post new topic  Reply to topic Goto page Previous  1, 2
 Sample MQPubSubApiSample throws RC 2085 « View previous topic :: View next topic » 
Author Message
Vitor
PostPosted: Wed May 18, 2016 8:06 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

RogerLacroix wrote:
I've never created any Pub/Sub stuff, so are you saying that if I issue the following MQSC then the sample will work?

Code:
DEFINE TOPIC('myTopicObject') TOPICSTR('/Test/Roger')




RogerLacroix wrote:
Or do I need to do something to create the topic string of '/Test/Roger' ??




You need to publish something.

So if we stick with the example:

Code:
DEFINE TOPIC(WC.TEAMS) TOPICSTR('/WorldCup/Teams') DEFPSIST(YES)


My most worthy associate can write an app that opens the object, publishes to a topic "/ManUMustDie" and that goes out as "/WorldCup/Teams/ManUMustDie". I can separately and independently produce an app that opens the same object and publishes "ArsenalTriumphant" that goes out as "WorldCup/Teams/ArsenalTriumphant" using the same topic object and the same settings without additional administrative effort.

Indeed, someone could ignore the topic object, directly publish "WorldCup/Teams/FranceFailsInFirstRound" and it would still be subject to the topic object because of the matching.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed May 18, 2016 8:16 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Vitor wrote:
My most worthy associate can write an app that opens the object, publishes to a topic "/ManUMustDie" and that goes out as "/WorldCup/Teams/ManUMustDie". I can separately and independently produce an app that opens the same object and publishes "ArsenalTriumphant" that goes out as "WorldCup/Teams/ArsenalTriumphant" using the same topic object and the same settings without additional administrative effort.

That's what I meant by a point of administrative control.

Neither application knows about the "/WorldCup/Teams/" part. And a subscriber that used the same topic object wouldn't either.

Vitor wrote:
Indeed, someone could ignore the topic object, directly publish "WorldCup/Teams/FranceFailsInFirstRound" and it would still be subject to the topic object because of the matching.

That's what I mean by a point of authorization.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed May 18, 2016 8:27 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Simply trying to expand the example to illustrate your most valid points.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed May 18, 2016 8:33 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Vitor wrote:
Simply trying to expand the example to illustrate your most valid points.


Although I did mix footie and rugby...
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed May 18, 2016 9:14 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqjeff wrote:
Vitor wrote:
Simply trying to expand the example to illustrate your most valid points.


Although I did mix footie and rugby...


The way Man U play, it doesn't matter......
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
hughson
PostPosted: Wed May 18, 2016 12:33 pm    Post subject: Reply with quote

Padawan

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

RogerLacroix wrote:
Hi,

Really!?!

The manual for MQSC Define Topic says:
Quote:
(topic-name)
Name of the IBM MQ topic definition (see Rules for naming IBM MQ objects ). The maximum length is 48 characters.

The name must not be the same as any other topic definition currently defined on this queue manager (unless REPLACE is specified).

It doesn't say anything about the 'topic-name' being the 'topic object'.

It don't think any MQ objects like channels, processes, name lists etc are ever refered to as objects, but we know them as MQ objects and recognise MQRC_UNKNOWN_OBJECT return code as referring to them. The topic is just the latest MQ object to get a DEFINE command.

I realise it's new to you, but just relate it to what you already know about MQ. You understand the difference between a channel object and a channel instance, and now you find a topic object. That'll be the defined thing then

RogerLacroix wrote:
I've never created any Pub/Sub stuff, so are you saying that if I issue the following MQSC then the sample will work?

Code:
DEFINE TOPIC('myTopicObject') TOPICSTR('/Test/Roger')

Yes.

I feel bad now. I could have saved you a week's hassle. I was going to add the define command to my original answer whenever it was but I thought it would insult your intelligence as I was sure you'd know how to do the define command once you realised that was what was missing.

RogerLacroix wrote:
Or do I need to do something to create the topic string of '/Test/Roger' ??

Regards,
Roger Lacroix
Capitalware Inc.

No, nothing else.

It's a shame you started with the Java sample to be honest, because the amqsput sample dosn't require you to make a topic object. Yes, you don't always need one, you can just use a topic string directly - just not the way this sample was coded. There's some discussion above about it. Perhaps your next task can be to change the Java sample to do without the topic objects.

If you haven't already been sent it by DaveWare, here's the Intoductory presentation on Pub/Sub.

https://share.confex.com/share/117/webprogram/Handout/Session9419/PubSub.pdf

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
RogerLacroix
PostPosted: Fri May 20, 2016 11:56 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3252
Location: London, ON Canada

Hi,

I issued the MQSC command:
Code:
DEFINE TOPIC('myTopicObject') TOPICSTR('/Test/Roger')

And then the sample runs just fine.

Now that my brain understands that 'topic-name' == 'topic object', the picture is getting clearly.

Yup, next week or so, I'll play around with just a 'topic string'.

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » IBM MQ Java / JMS » Sample MQPubSubApiSample throws RC 2085
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.