|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Pub Sub Concepts |
« View previous topic :: View next topic » |
Author |
Message
|
PeterPotkay |
Posted: Mon Jul 16, 2007 9:15 am Post subject: Pub Sub Concepts |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Just getting started with Pub Sub. The app in question is JMS for both the publisher and the subscriber. I am using the MQ Broker (not WB-IMB)
All components are at MQ 6.0.2.1.
The developer is using this article to get going:
http://www.ibm.com/developerworks/websphere/techjournal/0502_woolf/0502_woolf.html
(scroll down to the Pub Sub section)
I am reading the Pub Sub User's guide:
http://www.elink.ibmlink.ibm.com/publications/servlet/pbi.wss?CTY=US&FNC=SRX&PBL=SC34660600
My (first) questions are around what queues need to be defined and what access is needed.
A publisher will register with Broker via the SYSTEM.BROKER.CONTROL.QUEUE, so they need access to that.
The Publisher can then point to a stream queue for all its topics. Can that stream queue be any name?
The subscriber needs access to SYSTEM.BROKER.CONTROL.QUEUE to register its subscription.
And then the subscriber lets the broker know what queue it will listen on for subscriptions. Can that queue be any name?
The reason I ask these questions is that in that link the developer is looking at, it refers me to a runmqsc script that defines the following queues:
SYSTEM.JMS.ADMIN.QUEUE
SYSTEM.JMS.D.CC.SUBSCRIBER.QUEUE
SYSTEM.JMS.D.SUBSCRIBER.QUEUE
SYSTEM.JMS.MODEL.QUEUE
SYSTEM.JMS.ND.CC.SUBSCRIBER.QUEUE
SYSTEM.JMS.ND.SUBSCRIBER.QUEUE
SYSTEM.JMS.PS.STATUS.QUEUE
SYSTEM.JMS.REPORT.QUEUE
I did that and granted access.
What's the deal with these? They are not mentioned in the Pub Sub User Guide at all. If the publisher and or the subscriber are JMS we are forced to use these q names? (plus apparently access to SYSTEM.BROKER.CONTROL.QUEUE as well)
Our goal is to have this app have its own dedicated Pub/Sub queues (other tha SYSTEM.BROKER.CONTROL.QUEUE) but we are getting stuck with the below error when we try to use q names other than the defaults:
Code: |
JMS Exception: com.ibm.mq.jms.NoBrokerResponseException: MQJMS5053: *** No broker response. Please ensure that the broker is running. If you are using the WebSphere MQ broker check that your brokerVersion is set to V1 ***
Linked exception: com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2033 |
The Broker is running and reporting no errors.
Here is the question as phrased by the developer:
Quote: |
We are trying to set-up pub/sub model with MQ v6 and using JMS clients for both the publisher and subscriber. If we use the default set-up using the default SYSTEM and BROKER queues, it works just perfect. But if we try to define user defined system queues, the publisher waits after the publish command to receive a broker acknowledgement (I believe) which it doesn't get and eventually times out (in 2 mins) giving the following error message -
JMS Exception: com.ibm.mq.jms.NoBrokerResponseException: MQJMS5053: *** No broker response. Please ensure that the broker is running. If you are using the WebSphere MQ broker check that your brokerVersion is set to V1 ***
Linked exception: com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2033
The question is how do we set-up pub/sub using user defined system queues.
I use a bindings file which is created using the following jmsadmin set-up scripts -
====================================
# DEF TOPIC USING DEFAULT QUEUES
====================================
DEL TCF(ICCTCF)
DEL T(HIG.HLI.ICC.AGENT)
#
# Define a TopicConnectionFactory
# Only parameters being overridden from their default values are specified.
DEF TCF(ICCTCF) +
QMANAGER(HIGCONL3) +
CLIENTID(AGENT_SUBSCRIBER1) +
TRANSPORT(CLIENT) +
HOSTNAME(ERDHFDMQS803) +
PORT(1414) +
CHANNEL(HLI.ICC.EVENT) +
# Define a Topic
DEF T(HIG.HLI.ICC.AGENT) +
TOPIC(HIG.HLI.ICC.AGENT) +
#
END
================================================
# ALTER TOPIC TO USE USER DEFINED SYSTEM QUEUES
================================================
# Alter topic conn factory
ALT TCF(ICCTCF) +
BROKERSUBQ(SYSTEM.JMS.ND.SUBSCRIBER.QUEUE.HIG.HLI.ICC) +
BROKERCONQ(HIG.HLI.ICC.CONTROL.QUEUE) +
BROKERCCSUBQ(SYSTEM.JMS.ND.CC.SUBSCRIBER.QUEUE.HIG.HLI.ICC) +
BROKERPUBQ(HIG.HLI.ICC.DEFAULT.STREAM) +
# Alter the topic
ALT T(HIG.HLI.ICC.AGENT) +
BROKERDURSUBQ(SYSTEM.JMS.D.SUBSCRIBER.QUEUE.HIG.HLI.ICC) +
BROKERCCDURSUBQ(SYSTEM.JMS.D.CC.SUBSCRIBER.QUEUE.HIG.HLI.ICC) +
#
END
Now the JMSAdmin shows the tcf and topic defined as under -
InitCtx> dis tcf(ICCTCF)
CCSID(819)
BROKERSUBQ(SYSTEM.JMS.ND.SUBSCRIBER.QUEUE.HIG.HLI.ICC)
PORT(1414)
SYNCPOINTALLGETS(NO)
PUBACKINT(25)
POLLINGINT(5000)
RECEIVEISOLATION(COMMITTED)
MSGSELECTION(CLIENT)
OUTCOMENOTIFICATION(YES)
CHANNEL(HLI.ICC.EVENT)
OPTIMISTICPUBLICATION(NO)
BROKERCONQ(HIG.HLI.ICC.CONTROL.QUEUE)
USECONNPOOLING(YES)
HOSTNAME(ERDHFDMQS803)
CLONESUPP(DISABLED)
SPARSESUBS(NO)
VERSION(6)
BROKERCCSUBQ(SYSTEM.JMS.ND.CC.SUBSCRIBER.QUEUE.HIG.HLI.ICC)
PROCESSDURATION(UNKNOWN)
SSLRESETCOUNT(0)
CONNOPT(STANDARD)
BROKERQMGR()
SSLFIPSREQUIRED(NO)
MAPNAMESTYLE(STANDARD)
FAILIFQUIESCE(YES)
CLEANUP(SAFE)
RESCANINT(5000)
MSGBATCHSZ(10)
BROKERPUBQ(HIG.HLI.ICC.DEFAULT.STREAM)
QMANAGER(HIGCONL3)
BROKERVER(V1)
CLEANUPINT(3600000)
STATREFRESHINT(60000)
SUBSTORE(MIGRATE)
TRANSPORT(CLIENT)
TARGCLIENTMATCHING(YES)
CLIENTID(AGENT_SUBSCRIBER1)
InitCtx> dis t(HIG.HLI.ICC.AGENT)
BROKERPUBQMGR()
FAILIFQUIESCE(YES)
BROKERDURSUBQ(SYSTEM.JMS.D.SUBSCRIBER.QUEUE.HIG.HLI.ICC)
TOPIC(HIG.HLI.ICC.AGENT)
BROKERPUBQ()
BROKERVER(V1)
PERSISTENCE(APP)
CCSID(1208)
TARGCLIENT(JMS)
ENCODING(NATIVE)
BROKERCCDURSUBQ(SYSTEM.JMS.D.CC.SUBSCRIBER.QUEUE.HIG.HLI.ICC)
MULTICAST(ASCF)
PRIORITY(APP)
EXPIRY(APP)
VERSION(6)
InitCtx>
The other question is - why isn't it possible to define topics with user-defined system queues? I had to first define using the default system queues (1st script) and then alter the topic to use user-defined system queues.
|
_________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jul 16, 2007 1:34 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Peter,
I tried pub sub using the MessageBroker
The names are mandatory for JMS.
It has to be SYSTEM.JMS.xx.*
It does not have to be a base queue and can be an alias queue...
The topic will reflect as to where the message should be delivered. However if the queue is subscribed to a durable subscription you could retrieve the messages using point to point... but then you will not be able to filter by topic...
Enjoy _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|