• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
author
Posts: 4173
29
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Mohsin Kayal
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4173
29
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody I got it. I have to set the broker version to 2.

Thanks indeed to all.
 
My first bit of advice is that if you are going to be a mime, you shouldn't talk. Even the tiny ad is nodding:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic