Posted: Thu Jan 11, 2007 10:19 pm Post subject: How to create Publish/Subscribe commands using Java
Newbie
Joined: 11 Jan 2007 Posts: 4
Hi,
How do i create publish/subscribe commands in Java? My requirement is as follows
-- I need to send a register publisher command to the broker control queue
-- Next i need to send the publish command to a topic X to the broker stream
-- I have already registered the subscriber for this topic X using the Web sphere MQ v6.0.1 explorer
-- I am aware of the JMS approach but currently i need to accomplish the same without JMS. I only want to use the Websphere MQ for base Java package (com.ibm.mq.jar)
-- Also I need to generate the commands in MQRFH format since they should work with Websphere Publish/subscribe
Posted: Thu Jan 11, 2007 11:17 pm Post subject: Re: How to create Publish/Subscribe commands using Java
Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
sirish wrote:
-- I am aware of the JMS approach but currently i need to accomplish the same without JMS. I only want to use the Websphere MQ for base Java package (com.ibm.mq.jar)
-- Also I need to generate the commands in MQRFH format since they should work with Websphere Publish/subscribe
Why make your life complicated? It seems that the person imposing the constraints has little knowledge of the process. It will be up to you to educate them. Using JMS you will have a far easier time to deal with pub/sub than using any other method. Why do you think that IBM created the XMS toolset (hint JMS for non java set)? You should have all the jars needed for pub/sub and JMS (yes even stand alone without a server) in the <MQInstall>/java/lib directory...
I agree. It would be much simpler to do the same in JMS. However the requirement is to have some kind of triggering of the Java application (which is easy using the base MQ) when a publisher sends a publication. There should not a subscriber that is continuously polling for the topic. Would this be possible in JMS? If so any inputs?
There's no way to monitor for a publication without being a subscriber.
There's tons of reference in the WebSphere MQ Using Pub/Sub manual on how to write code to create a publisher. _________________ I am *not* the model of the modern major general.
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