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 » General IBM MQ Support » MessageId mapping Using ESQL...

Post new topic  Reply to topic
 MessageId mapping Using ESQL... « View previous topic :: View next topic » 
Author Message
rajmq
PostPosted: Thu Mar 27, 2003 5:56 am    Post subject: MessageId mapping Using ESQL... Reply with quote

Partisan

Joined: 29 Sep 2002
Posts: 331
Location: USA

Hi

I am Using MQ5.2.1 and WMQI2.1 for Application.

Using the java Client Program is setting messageId='XXX' and i am putting that value to inputQ which is assigned to MQInputNode

My Message Flow Diagram
MQInputNode----->ComputeNode------> PublicationNode

Here Probelm is i am able to see the same messageId (XXX) in inputQ.
once it is published to my Received application there the messageId different.But i checked the same message in inputQ there messageId is XXX.
In Compute i am setting below ESQL Commands

SET OutputRoot.MQMD = InputRoot.MQMD;
SET OutputRoot.MQRFH2.psc.Command = 'Publish' ;
SET OutputRoot.MQRFH2.psc.Topic = 'XXXXX' ;
SET OutputRoot.XML = InputRoot.XML;

After Publishing How can i get same messageId??
can anyone help me out !!

regards
raj
Back to top
View user's profile Send private message
mcatama
PostPosted: Thu Mar 27, 2003 6:26 am    Post subject: Reply with quote

Novice

Joined: 10 Apr 2002
Posts: 17

Hi Raj,

The following is an extract from the WMQI 2.1 Programming Guide, Chapter 5 in the section 'MQMD for publications forwarded by a broker':

Quote:
This section describes the message descriptor for messages sent by the broker to
subscribers.
All fields in the MQMD, except those listed below, are set to their default values.

MsgId Will be set to a unique value.


According to this it will always set the MsgId to a unique value. Perhaps you could store the MsgId somewhere else in the message for your receiving application to retrieve it, such as a field in the 'usr' folder of the MQRFH2 header?

Alison
Back to top
View user's profile Send private message
rajmq
PostPosted: Thu Mar 27, 2003 10:58 pm    Post subject: Reply with quote

Partisan

Joined: 29 Sep 2002
Posts: 331
Location: USA

Hi

Thanks for Reply

Already each application setting MsgId is Unique value only.it may differenet to each application.So i don't want to keep the this unique value to inside the receiver message.
Suppose i am keeping the this info to usr folder.The problem is the receiver side after getting the message i am removing the header information, i am reading only message.
But one thing i am not understanding other MQMD parameters(like ReplyQ, Expiry and MsgType) are same after publishing by boker.

Why the messageId only is different??
Using the Compute is it possible to set messageId value.I???
was tried like
SET OutputRoot.MQMD = InputRoot.MQMD;
SET OutputRoot.MQRFH2.psc.Command = 'Publish' ;
SET OutputRoot.MQRFH2.psc.Topic = 'XXXXX' ;
SET OutputRoot.MQMD.messgeId = 'XXX' ;
SET OutputRoot.XML = InputRoot.XML;

I am getting some other messageId in the receiver queue.
anything wrong in the above setup??

regards
raj
Back to top
View user's profile Send private message
mcatama
PostPosted: Fri Mar 28, 2003 1:34 am    Post subject: Reply with quote

Novice

Joined: 10 Apr 2002
Posts: 17

Hi,

If you check out the document referenced above it gives full details of how the broker sets each field in the MQMD for a published message.

In some cases the values from the original message are retained (e.g. Expiry field), in other cases it will generate a new value (e.g. MsgId), and in other cases it will set a default value. ( e.g. Report field)

This means that for these fields where it generates a new value or sets a default value, it does not matter what you set in the ESQL code before the publish, the broker will overwrite it. As far as I know there is no way around this.

Alison
Back to top
View user's profile Send private message
rajmq
PostPosted: Fri Mar 28, 2003 10:04 pm    Post subject: Reply with quote

Partisan

Joined: 29 Sep 2002
Posts: 331
Location: USA

Hi

In ESQL before publishing i am setting messaeId is unique value.
But i am not able to see same messageId in receiving application queue.
queuemanager is creating different messageId.
I am posting my ESQL Here..
SET OutputRoot.MQMD = InputRoot.MQMD;
SET OutputRoot.MQMD.messgeId = 'XXX' ; ///here i am assiging ..but it is different in the queue
SET OutputRoot.MQRFH2.psc.Command = 'Publish' ;
SET OutputRoot.MQRFH2.psc.Topic = 'XXXXX' ;
SET OutputRoot.XML = InputRoot.XML

can anyone help me for above prob..

regards
raj
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Sat Mar 29, 2003 12:35 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

mcatama already answered this question.

The broker will always reset the MessageID to a new value when it publishes the message. This happens after your ESQL code, and you can't change it.
Back to top
View user's profile Send private message
rajmq
PostPosted: Tue Apr 01, 2003 10:12 pm    Post subject: Reply with quote

Partisan

Joined: 29 Sep 2002
Posts: 331
Location: USA

Hi

Thanks to all

Generally we are using MessaeId and CorrelationId fields for identication of response message. So It is only applicable for MQSeries Pt to Pt communication. The same pub/sub we can't use the MsgId and CorrId for Identify.
because while publishing broker is assigning new values for MsgId and corrId.

If i am wrong pl correct me and How to slove the above probs??

can anybody help me

regards
raj
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Apr 02, 2003 6:24 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

This should really be in the WMQI board, and not this one.

I haven't worked with pub/sub a lot yet, but here's a couple of thoughts.

You could use the publication topics to include an id to correlation your reply with a request. Heck, you could even use the original MsgID and CorrelID values. Just put them as additional levels of topics, i.e. 'topicRoot/topicCategory/topic/topic/MsgID/CorrelID' as your topic.

Or you create an extra field or two in your message to store your MsgId and CorrelIDs, or any other value that you want to use to correlate a response to a reply.

I'm not sure why you're using pub/sub for a request/reply design, though. It is really more of a point-to-point design than a one-to-many design.
Back to top
View user's profile Send private message
rajmq
PostPosted: Wed Apr 02, 2003 8:02 am    Post subject: Reply with quote

Partisan

Joined: 29 Sep 2002
Posts: 331
Location: USA

Hi

I full idea is we don't keep the msgId, corrId or any kind of properties variable inside the Application message.we need to keep these properties in MQ level.But broker is handling in different way.......

ok anyother suggestions ........

thanks for Reply

raj
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Apr 02, 2003 8:18 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Well, you could put your message id data into another folder in the RFH2 header.

That wouldn't mess with your topic hierarchy, or your application data.
Back to top
View user's profile Send private message
rajmq
PostPosted: Wed Apr 02, 2003 10:29 pm    Post subject: Reply with quote

Partisan

Joined: 29 Sep 2002
Posts: 331
Location: USA

Hi

I think i mentioned already this point,
Suppose i am keeping my referernce another folder in the RFH2 header,the problem is after getting our receiving application removing the RFH2 header information and it is reading only applicationMessage.

thanks

raj
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Apr 03, 2003 7:47 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Yes, you did mention that, and I didn't notice.

But I think there isn't any solution to the problem the way you want it to work. Pub/Sub is not designed to support request/reply patterns. Request/Reply is really supposed to be a one-to-one design, and not a one-to-many design.

What are you trying to accomplish by using Pub/Sub that you can't do with a "normal" request/reply?
Back to top
View user's profile Send private message
rajmq
PostPosted: Fri Apr 04, 2003 5:26 am    Post subject: Reply with quote

Partisan

Joined: 29 Sep 2002
Posts: 331
Location: USA

Hi

Think is already one application is using MQ5.2 and Wmqi2.1 pub/sub.
Now we are trying to plugin new system to old application,their i need this scenerio.

regards
raj
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » MessageId mapping Using ESQL...
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.