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 IndexIBM MQ Java / JMSTesting Pub-Sub durable scenario.

Post new topicReply to topic
Testing Pub-Sub durable scenario. View previous topic :: View next topic
Author Message
marcin.kasinski
PostPosted: Wed Mar 19, 2008 1:50 am Post subject: Testing Pub-Sub durable scenario. Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

I have small JMSSubscriber application.

In this application I create durable subscriber on topic and receive published messages.

When I run this application everything works fine.
But when I run another instance of this application I get “
Broker command failed: MQRCCF_SUBSCRIPTION_LOCKED Reason code 3156.”


I red that I can change optional parms for registering.
I tried with CONNOPT(SHARED) of topic connection factory in my JMSAdmin script, but it doesn’t work.

My question is : how can I share this durable subscription ?
I mean how can I receive published messages with 2,3,4,… open MQ connections. I can not find this information.
_________________
Marcin


Last edited by marcin.kasinski on Thu Mar 20, 2008 1:45 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
bower5932
PostPosted: Wed Mar 19, 2008 2:44 am Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

I've done this before using the mqjmssub.java program at:

http://www-304.ibm.com/jct09002c/isv/tech/sampmq.html

I believe you have to specify a different 'id' of some sort. I believe the program uses the '-D' switch to accomplish this.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
marcin.kasinski
PostPosted: Wed Mar 19, 2008 3:08 am Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

Hi,
Thanks for reply.
I know his examples.
Problem is that I can not specify different id.

If I specify different id every instance will receive the same message.
From my point of view these are duplicated messages.

In my scenario I would like to receive message from queue and process it by instance.
And do the same concurrently by other instances. I expect every instance processing own unique messages.
_________________
Marcin


Last edited by marcin.kasinski on Thu Mar 20, 2008 1:47 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
bower5932
PostPosted: Wed Mar 19, 2008 5:24 am Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

marcin.kasinski wrote:
If I specify different id every instance will receives the same message.
From my point of view these are duplicated messages.


This is the point of publish/subscribe. All of the subscribers should get a copy of the message.

I think I'm confused on what you are trying to do.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
marcin.kasinski
PostPosted: Wed Mar 19, 2008 6:23 am Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

bower5932 wrote:


This is the point of publish/subscribe. All of the subscribers should get a copy of the message.

I think I'm confused on what you are trying to do.



I’m just testing multi-threading or multi-process scenario.
Let say every message is processed 10 minutes.
I’m trying to run run 10 instances the same application to increase performance (many instances the same subscriber ).

I hope now it is clear.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Wed Mar 19, 2008 6:29 am Post subject: Reply with quote

Grand High Poobah

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

marcin.kasinski wrote:
I’m trying to run run 10 instances the same application to increase performance (many instances the same subscriber ).

I hope now it is clear.


Not really.

Do you mean that the same message processed simultaniously by 10 applications - how do the different application avoid duplication of effort?

Or do you mean that each message takes 10 minutes to process, hence the next message arrives before the previous one has finished processing and you want it picked up and started by another instance?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Mar 19, 2008 6:42 am Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Create one instance that is the subscriber, and the rest of the instances as plain listeners.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Wed Mar 19, 2008 12:40 pm Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

Vitor wrote:

Or do you mean that each message takes 10 minutes to process, hence the next message arrives before the previous one has finished processing and you want it picked up and started by another instance?



Yes. This is a problem.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
marcin.kasinski
PostPosted: Wed Mar 19, 2008 12:41 pm Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

jefflowrey wrote:
Create one instance that is the subscriber, and the rest of the instances as plain listeners.



Thanks jefflowrey for reply.
It is very simple solution and I've tested it already.
I thought there is another "better" way.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Wed Mar 19, 2008 2:28 pm Post subject: Reply with quote

Grand High Poobah

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

RFHUtil allows for a "shared subscription". But you'd have to read up on it and how it works. I am not sure that the plain MQBroker will care for it or allow it.

Make sure that your Topic defines a delivery queue that is unique for your usage. Any QueueSession can then create a Receiver for this queue Destination. When you receive the message it will still show the Topic in the destination...

The big difference there is that you will not filter the topics anymore. Any message on the queue is game....

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
marcin.kasinski
PostPosted: Thu Mar 20, 2008 1:44 pm Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

Hi,

I've tested my multi-instance scenario.

It works if I set CLONESUPP(ENABLED) on TCF.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexIBM MQ Java / JMSTesting Pub-Sub durable scenario.
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.