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 » Java app uses dynamic subscriptions instead of JMS Topic

Post new topic  Reply to topic
 Java app uses dynamic subscriptions instead of JMS Topic « View previous topic :: View next topic » 
Author Message
liquid667
PostPosted: Thu Oct 30, 2014 12:39 am    Post subject: Java app uses dynamic subscriptions instead of JMS Topic Reply with quote

Newbie

Joined: 29 Oct 2014
Posts: 4

Hi,

First time poster!

I have problem with an application that i am responsible for.
The application is supposed to use a MQ Topic for a standard pub/sub
scenario.
The problem is that i believe that my Operations department haven't set things up correctly.

The application is a standard Java ee application running on Glassfish 3.1.2.
We use normal JMS MDB and JMS send functionality to broadcast messages to all connected subscribers.

When i check with MQ explorer i find that the topic isn't used but instead the application and mq seems to have created two "subscriptions" instead.

I can also see that the message count on each of the subscriptions is very high ~500.000 messages per subscription.

I am wondering what the reason is that the application doesn't the "topic".

I read references to config of JMS Topics, but from the config in MQ Explorer i do not see any references to JMS on the mq setup.
And when i try to create a new topic and check the "create jms topic" i end up in a "no jms context" defined dialog and cannot create the JMS topic.

Any ideas what the problem could be, is it the setup of the MQ server and missing jms topic that causes the application/mq to create "subscriptions"?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Oct 30, 2014 5:57 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The subscriptions are what the various applications are using to receive the messages (i.e. your MDBs).

MQ "topic" objects are really just control points. They do not represent the segments of the topic space that are actually in use.

A set of applications can easily publish and receive messages on any topic at all, and no MQ Topic objects will be created. If an MQ administrator wishes to implement security or other kinds of controls on a section of the topic space, then they can use an MQ Topic object to do that.

The JMS section of MQ Explorer is used to configure JNDI resources, and only to configure JNDI resources. It's not in any way used directly by MQ itself.

Glassfish may have other tools for configuring JMS objects in it's JNDI. So there's not necessarily any reason to use the JMS part of MQ Explorer.
Back to top
View user's profile Send private message
liquid667
PostPosted: Sun Nov 02, 2014 9:38 am    Post subject: Reply with quote

Newbie

Joined: 29 Oct 2014
Posts: 4

Ok, so just to be sure that i understand correctly.

Depending on security restrictions from the admin of the MQ server the setup can be different.

In my thought case i requested a topic, the admin setup a topic, the application used the same topic, and if no topic was available the application would not have worked.
I.e. this is how i thought that it would have been setup.

But instead the admin have given access to the MQ server, so that the application now creates its own "temporary" objects, here pub/sub is done using a "dynamically" created topic and then the applications attach as "subscriptions". So as i have two cluster servers there are two subscriptions and in the subscription there is a "topic string" that is the same as the application uses to post the messages.

Have i understood correctly?

One additional question, in MQ Explorer under "subscription\status" there is a Message counter, this value is quite high. Does it refer to stored messages (as a queue?) or just a counter how many messages have been delivered to the "subscription"?

Best regards

Mikael
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Nov 03, 2014 6:52 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The topic string is always what the application uses, and essentially represents what you are thinking of as the "topic". It is, in fact, the actual topic.

The point is that the actual topic being published to and subscribed from is NOT the same as an MQ Topic object.

The topic exists as a point in a topic hierarchy - the tree of all possible topics, fundamentally, but more accurately a topic is a path along a specific topic tree with a specific root.

Yes, the MQ Administrator first needs to grant permissions to connect to the queue manager. The MQ admnistrator then needs to grant permissions to the application user to open objects and publish or subscribe.

The MQ administrator can then use MQ Topic objects to do two things
  1. Provide security controls at various points in various topic trees - for example, prevent an application from publishing to /SYSTEM topics. ('/SYSTEM' is an arbitrary example)
  2. Provide a short cut for the application to specify a sub-path in a topic tree. That is, the application opens MQ Topic Object A.B.C, which has a Topic string of '/A/B/C". The application then publishes to topic "/D/E". Because the application has used A.B.C, the *actual* topic that is published to is '/A/B/C/D/E'.

I refer you to the documentation on what the Message counter is. I suggest first looking at the documentation for the MQSC command 'DISPLAY SUBSTATUS'.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Nov 03, 2014 7:08 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

You will also need permission to 'Publish' to the topic. This tripped me up on a WMQ 7.5 installation that was upgraded from V7.0.1.8.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Java app uses dynamic subscriptions instead of JMS Topic
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.