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 » Strange behaviour when working with correlation Id

Post new topic  Reply to topic
 Strange behaviour when working with correlation Id « View previous topic :: View next topic » 
Author Message
edmondh
PostPosted: Fri May 11, 2007 7:40 am    Post subject: Strange behaviour when working with correlation Id Reply with quote

Novice

Joined: 17 Feb 2006
Posts: 14
Location: London

Hi
I assume someone has try this before & can help.

I have two scencario
A When I have a correlationId & want to specify a it as corelation ID for a message
B When I don't have a correlation & want to copy message id as correlation id

So my code looks like
// if supplied set message Id
if (correlationId != null) {
message.report = MQC.MQRO_PASS_CORREL_ID;
message.messageType = MQC.MQMT_REPORT;
message..correlationId = correlationId;
}else{
message.report = MQC.MQRO_COPY_MSG_ID_TO_CORREL_ID;
message.messageType = MQC.MQMT_REPORT;
}

In case A , my message properties indicate a correlation Id as set & report properties are as expected: Pass correlation identifier

However in case B
Message property return with message Correaltion Id NOT set & following report properties:
New message identifier
Copy message identifier to correlation identifier
Place message on dead-letter queue
None


Where is would have expect just to see Copy message identifier to correlation identifier
From java doc file I see the four report options have a value of zero..

Is these some is consistencies here, please advise
I am using WMQ6.0

Rgds
Ed
_________________
Thank you for your time
Ed
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Fri May 11, 2007 7:51 am    Post subject: Re: Strange behaviour when working with correlation Id Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

edmondh wrote:


B When I don't have a correlation & want to copy message id as correlation id


You have to do it manually

Code:
    message..correlationId = messageId;



MQC.MQRO_COPY_MSG_ID_TO_CORREL_ID report it's just a tip for reply application what it should do with messageid or correlid.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
marcin.kasinski
PostPosted: Fri May 11, 2007 7:55 am    Post subject: Re: Strange behaviour when working with correlation Id Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

edmondh wrote:

message.messageType = MQC.MQMT_REPORT;



Is it really your message type ?
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
edmondh
PostPosted: Fri May 11, 2007 8:09 am    Post subject: Reply with quote

Novice

Joined: 17 Feb 2006
Posts: 14
Location: London

OOOHHHH.........
Cheers for reply.....

I was hoping QM could automatically copy messageId to correlationId if so requested?
_________________
Thank you for your time
Ed
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri May 11, 2007 8:11 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

edmondh wrote:
I was hoping QM could automatically copy messageId to correlationId if so requested?


No.
_________________
I am *not* the model of the modern major general.
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 » IBM MQ Java / JMS » Strange behaviour when working with correlation Id
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.