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 » process JMS message from non-JMS client

Post new topic  Reply to topic
 process JMS message from non-JMS client « View previous topic :: View next topic » 
Author Message
bamboozled_by_MQ
PostPosted: Mon Sep 13, 2004 12:06 pm    Post subject: process JMS message from non-JMS client Reply with quote

Voyager

Joined: 07 Jan 2004
Posts: 75

I want to take a simple MQ message and build a JMS message with it. Does anyone know of any examples.

I want to be able to put a simple mq message on a queue (using MMC mq explorer) and have another program come grab it and make a JMS message with it.

sounds easy, but...
thank you!
Back to top
View user's profile Send private message
bower5932
PostPosted: Mon Sep 13, 2004 12:17 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

All that you'll need to do is add an RFH2 header to the front of the message. If you browse a JMS message on the queue and look through chapter 12 of the Using Java manual, you should get the information that you need. There is a C program at:

http://www.developer.ibm.com/tech/sampmq.html

that builds an RFH2 header. It is called jsmqput.c (that is jsm not jms!). You might want to look at it.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
bamboozled_by_MQ
PostPosted: Tue Sep 14, 2004 5:16 am    Post subject: Reply with quote

Voyager

Joined: 07 Jan 2004
Posts: 75

so if I understand you correctly,

I can write a java program that reads a regular MQ message off a local queue, then add a MQRFH2 header and it becomes a JMS message that can be put on another queue to be picked up by a message driven bean? I'm not to good at C, so that example is a little confusing, does anyone have an example of adding a MQRFH2 header (In JAVA) to a regular mq message to make a JMS message?

I am new to this, so I hope I don't sound TOO dumb. thanks for any help.
Back to top
View user's profile Send private message
vennela
PostPosted: Tue Sep 14, 2004 6:19 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Quote:
then add a MQRFH2 header and it becomes a JMS message that can be put on another queue to be picked up by a message driven bean?

Even if you don't have MQRFH2 header to your message, i,e, even if it is straight MQ message MDB will pick it up.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
fjb_saper
PostPosted: Tue Sep 14, 2004 11:38 am    Post subject: Reply with quote

Grand High Poobah

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

There is no definition to a "JMSMessage" and a non "JMSMessage"

Any MQ message can be treated as a "JMS" message. However the information on the message can be more complete or more scarse.

The most complete information is on a message with an RFH2 header.
This does not mean that a message without RFH2 header needs special treatment before it can be consumed. Our messages come from non JMS applications, and thus without an RFH2 header and we consume them without transformation from JMS (MDB).

Without the RFH2 header there are just a number of attributes to the message that will not be available. Check out the manual using java for the different mappings from MQMD and RFH2 structures.

Enjoy
Back to top
View user's profile Send private message Send e-mail
bamboozled_by_MQ
PostPosted: Fri Oct 01, 2004 10:33 am    Post subject: Reply with quote

Voyager

Joined: 07 Jan 2004
Posts: 75

i am still a little confused..

if I have a native MQ queue that has an MQ message on it. I want a generic JMS program to read the message and then pass the data on to a newer j2ee architecture, do I need to break down the message and rebuild it first(adding the mqrfh2 header)?

basically going from ative MQseries and I want to make it pure JMS and then pass to another j2ee component

im very new to this, so thank you
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Oct 01, 2004 10:40 am    Post subject: Reply with quote

Grand High Poobah

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

No, you don't need to deconstruct the message.

JMS will read the message without an RFH2 header just as well as if it had one. The big difference is in the envelope information that is not the same whether you use the RFH2 header or not.

Enjoy
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » process JMS message from non-JMS client
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.