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 » JMS and Cluster Topics - no JNDI

Post new topic  Reply to topic
 JMS and Cluster Topics - no JNDI « View previous topic :: View next topic » 
Author Message
tof
PostPosted: Mon Sep 29, 2008 2:05 am    Post subject: JMS and Cluster Topics - no JNDI Reply with quote

Novice

Joined: 29 Sep 2008
Posts: 14

Hi all,

I am trying to setup a (big) cluster of WMQ7 queue managers to do distributed publish subscribe. Anyhow I cannot seem to be able to have messages go from a queue manager to the next, all subscribers only receive local (i.e. same server) publications.

How do I specify the cluster (and maybe pubscope and subscope) properties using JMS? Any time I try to do it (either with URL syntax or setStringProperty my java client die without error messages).

Here's an extract of what I do:

Code:
JmsFactoryFactory ff = JmsFactoryFactory.getInstance(JmsConstants.WMQ_PROVIDER);
         MQTopicConnectionFactory factory = (MQTopicConnectionFactory) ff.createTopicConnectionFactory();
      
         // Config
         factory.setHostName("localhost");
         factory.setPort(server_port);
   factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
         // message selection performed by broker
      factory.setMessageSelection(JMSC.MQJMS_MSEL_BROKER);
         factory.setQueueManager(qmgr);
         connection = (MQTopicConnection) factory.createTopicConnection();
         connection.start();
         session = (MQTopicSession) connection.createTopicSession(false,
               Session.DUPS_OK_ACKNOWLEDGE);
         topic = (MQTopic) session.createTopic("topic://mytopic?cluster=WEEVIL&brokerVersion=1");


Any help would be just great !

Thanks in advance,

g
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Sep 29, 2008 11:22 am    Post subject: Re: JMS and Cluster Topics - no JNDI Reply with quote

Grand High Poobah

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

tof wrote:
Hi all,

I am trying to setup a (big) cluster of WMQ7 queue managers to do distributed publish subscribe. Anyhow I cannot seem to be able to have messages go from a queue manager to the next, all subscribers only receive local (i.e. same server) publications.

How do I specify the cluster (and maybe pubscope and subscope) properties using JMS? Any time I try to do it (either with URL syntax or setStringProperty my java client die without error messages).

Here's an extract of what I do:

Code:
JmsFactoryFactory ff = JmsFactoryFactory.getInstance(JmsConstants.WMQ_PROVIDER);
         MQTopicConnectionFactory factory = (MQTopicConnectionFactory) ff.createTopicConnectionFactory();
      
         // Config
         factory.setHostName("localhost");
         factory.setPort(server_port);
   factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
         // message selection performed by broker
      factory.setMessageSelection(JMSC.MQJMS_MSEL_BROKER);
         factory.setQueueManager(qmgr);
         connection = (MQTopicConnection) factory.createTopicConnection();
         connection.start();
         session = (MQTopicSession) connection.createTopicSession(false,
               Session.DUPS_OK_ACKNOWLEDGE);
         topic = (MQTopic) session.createTopic("topic://mytopic?cluster=WEEVIL&brokerVersion=1");


Any help would be just great !

Thanks in advance,


You have to think multidimensional:
Do you want something like load balancing in pub/sub?

We retrieve the messages all from a subscription queue.
The brokers are in a collective (WMB V6.0.0.5) (cluster=MQ V7 terminology)
There is a subscription flow that will create a local subscription on each broker in the collective for the topic specified.
So no matter to which broker you publish, the subscriber will get his copy.

Translate this into MQV7 and you have a load balanced pub/sub...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
tof
PostPosted: Mon Sep 29, 2008 12:32 pm    Post subject: Reply with quote

Novice

Joined: 29 Sep 2008
Posts: 14

Thank you fjb_saper,

I found out what I was doing wrong. As usual it was a terribly trivial thing : I don't have the code here, but I was not setting the "baseName" or something like that for a topic and this was enough not to give errors and to publish only locally. Stupid me wasting a long time on this one, anyhow a nice example in the guide combining JMS + clustering + pub/sub would probably have saved some time to newbies like myself, maybe I'll post this somewhere.

Anyhow, concerning load balancing: that's exactly what I'm trying to achieve, I want to setup a big network of brokers and have them automatically route messages to the appropriate (matching) subscriber. That should achieve higher throughput than a single queue mgr, incurring in some overhead.

Thank you again for your time.

g
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 » JMS and Cluster Topics - no JNDI
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.