aspose file tools*
The moose likes Websphere and the fly likes How to publish Messages in User Defined Queue Instead of Stream Queue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "How to publish Messages in User Defined Queue Instead of Stream Queue" Watch "How to publish Messages in User Defined Queue Instead of Stream Queue" New topic
Author

How to publish Messages in User Defined Queue Instead of Stream Queue

Mohsin Kayal
Greenhorn

Joined: Oct 22, 2005
Posts: 23
We are developing an enterprise application in which we need to publish the message in an User Defined Queue (say Q.PUBLISH.QUEUE).

As we know that by default the messages published are send to the SYSTEM.BROKER.DEFAULT.STREAM, instead of this queue we need to publish in our queue Q.PUBLISH.QUEUE through JMS.How can we do this?

We are using :
IBM Websphere MQ 5.3 with CSD 11
JMS 1.1


[ December 11, 2005: Message edited by: Mohsin Kayal ]
[ December 11, 2005: Message edited by: Mohsin Kayal ]
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3716
    
    5

Can you post some of the code you're using to send the message? I don't see why you can't publish to this queue? Once you define a JMS queue on top of a physical queue, it can be accessed using its JNDI value.


My Blog: Down Home Country Coding with Scott Selikoff
Mohsin Kayal
Greenhorn

Joined: Oct 22, 2005
Posts: 23
Our requirement is PUBLISHER ----> MQ BROKER CONTROL QUEUE(system defined) ----> MQ BROKER RESULT QUEUE(user defined) ---> PUBLISHER QUEUE (user defined)

Instead of using system default "SYSTEM.BROKER.DEFAULT.STREAM" queue how can we specify user defined queue in the connection factory for JNDI look up.

If we set reply to queue as user defined result queue in the message, Did broker transmit the published message to result queue(user defined)?

DEF TCF(LMIQueueConnFact) QMGR(LMI_QM) HOST(80.0.0.131) TRANSPORT(CLIENT) PORT(1414) POLLINGINT(500) MSGBATCHSZ(10) BROKERVER(V1) SUBSTORE(QUEUE)

DEF T(LMIMarketStatus) TOPIC(LMIMarketStatus)
DEF T(LMICancelAndExecution) TOPIC(LMICancelAndExecution)

DIS CTX
END
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3716
    
    5

I'm not quite sure I follow that, but it sounds like you have some restricted ability to send a message to a different queue? Really there is no such restriction in WebSphere, you can send to which queue you want using the JNDI or directly to the physical queue if you need to.

Also, you can define a mediation handler on the queue via a session bean that can filter and re-route messages as needed.
Mohsin Kayal
Greenhorn

Joined: Oct 22, 2005
Posts: 23
Hi Mr.Scott,

We are not using Websphere, but instead we are using a standalone java application which uses JMS to publish message. On the receiving side only we are using websphere. Here what we want is how to publish our messages on our Queue (ie; user defined queue) instead of default stream queue. It would be a greathelp for us if u provide me .scp file for publishing on that particular user defined queue.

What changes I have to make in my following .scp file :

DEF TCF(LMIQueueConnFact) QMGR(LMI_QM) HOST(80.0.0.131) TRANSPORT(CLIENT) PORT(1414) POLLINGINT(500) MSGBATCHSZ(10) BROKERVER(V1) SUBSTORE(QUEUE)

DEF T(LMIMarketStatus) TOPIC(LMIMarketStatus)
DEF T(LMICancelAndExecution) TOPIC(LMICancelAndExecution)

DIS CTX
END
Mohsin Kayal
Greenhorn

Joined: Oct 22, 2005
Posts: 23
I got it. I have to specify BROKERPUBQ with the Queue Name under Topic Connection Factory.

Now I need to know how to register that publisher queue with the broker. Without that I got MQJMS5053:Broker Not Running! Pls.Start it Exception.

Can anybody explain me how to register my publisher queue (User Defined Queue) with the broker.
Mohsin Kayal
Greenhorn

Joined: Oct 22, 2005
Posts: 23
Hi everybody I got it. I have to set the broker version to 2.

Thanks indeed to all.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to publish Messages in User Defined Queue Instead of Stream Queue