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 » WebSphere Message Broker (ACE) Support » MQOutput generating new message id problem

Post new topic  Reply to topic
 MQOutput generating new message id problem « View previous topic :: View next topic » 
Author Message
adrian_
PostPosted: Sun Apr 08, 2012 8:30 am    Post subject: MQOutput generating new message id problem Reply with quote

Novice

Joined: 06 Jan 2012
Posts: 13

hi ,i have a flow where i use a MQOutput node, with generate new message ID.
My problem is that MQOutput node generate same id every time,
so in destination queue i have all messages with the same id.

This is issue is known ?
Is there any solutions for this (using MQOutput node, i don't want to generate the id outside the mqoutput node)?
Back to top
View user's profile Send private message
mapa
PostPosted: Sun Apr 08, 2012 8:46 am    Post subject: Reply with quote

Master

Joined: 09 Aug 2001
Posts: 257
Location: Malmö, Sweden

version and platform is?

And what does your flow do?
Just so you don't send tests with same id and then just pass it along...
Back to top
View user's profile Send private message Visit poster's website
mqsiuser
PostPosted: Sun Apr 08, 2012 8:56 am    Post subject: Re: MQOutput generating new message id problem Reply with quote

Yatiri

Joined: 15 Apr 2008
Posts: 637
Location: Germany

Is it the same as the input msg id ?

Have you changed "pass all" to "set all" (on the output node):

Code:
Advanced -> "Message context" = "Pass All" --> "Set All"


There actually also is a "programmatic" way to set the msg-id:

Code:
SET OutputRoot.MQMD.MsgId = MQPMO_NEW_MSG_ID; -- new msg id   
SET OutputRoot.MQMD.MsgId = MQMI_NONE;  -- no MsgID (probably not a good idea in many cases)


...but... I think you should do it on the output-node !
_________________
Just use REFERENCEs
Back to top
View user's profile Send private message
zpat
PostPosted: Sun Apr 08, 2012 10:22 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Clearing the msgid field each time is the key to getting unique ones generated.
Back to top
View user's profile Send private message
mqsiuser
PostPosted: Mon Apr 09, 2012 12:08 am    Post subject: Reply with quote

Yatiri

Joined: 15 Apr 2008
Posts: 637
Location: Germany

zpat wrote:
Clearing the msgid field each time is the key to getting unique ones generated.


Code:
SET OutputRoot.MQMD.MsgId = MQMI_NONE;


When I did this, this just lead to an empty MsgId on the output-msg and was the reason for me to create an account here and ask my first question on this forum. But well... the reason why I tried this must have been what zpat says... good luck with all that input ... I made it work with just the output-node (and the 2 settings there) afaicr.
_________________
Just use REFERENCEs
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Apr 09, 2012 7:29 pm    Post subject: Reply with quote

Grand High Poobah

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

On the MQOutput node inspect the properties and check create new messageId. Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
zpat
PostPosted: Mon Apr 09, 2012 11:23 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Well, I didn't code the WMB node obviously - but I am giving standard MQ programming advice, as in the IBM manual.

Quote:
For the MQPUT and MQPUT1 calls, if MQMI_NONE or MQPMO_NEW_MSG_ID is specified by the application, the queue manager generates a unique message identifier when the message is put, and places it in the message descriptor sent with the message. The queue manager also returns this message identifier in the message descriptor belonging to the sending application. The application can use this value to record information about particular messages, and to respond to queries from other parts of the application. The sending application can also specify a value for the message identifier other than MQMI_NONE; this stops the queue manager generating a unique message identifier. An application that is forwarding a message can use this to propagate the message identifier of the original message.
Back to top
View user's profile Send private message
mqsiuser
PostPosted: Mon Apr 09, 2012 11:45 pm    Post subject: Reply with quote

Yatiri

Joined: 15 Apr 2008
Posts: 637
Location: Germany

zpat wrote:
Well, I didn't code the WMB node obviously - but I am giving standard MQ programming advice, as in the IBM manual.


Probably I had use this:

Quote:
SET OutputRoot.MQMD.MsgId = '';


or this:

Quote:
SET OutputRoot.MQMD.MsgId = NULL;


And then got into trouble... so ...

Dear, OP... since you brought it up here ... (and you also got provided some valuable input ) would you mind... to test both approaches and let us know.

That would be awesome (and quite clarifying).

Probably there are different "EMTIES", otherwise (with what zpat wrote) the msgId could never have been empty (and my problem and that of other people(?) would/could have never occured ).
_________________
Just use REFERENCEs
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Apr 10, 2012 8:38 pm    Post subject: Reply with quote

Grand High Poobah

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

mqsiuser wrote:
Probably I had use this:

Code:
SET OutputRoot.MQMD.MsgId = '';


or this:

Code:
SET OutputRoot.MQMD.MsgId = NULL;


And then got into trouble... so ...


Well we already know this won't work.
The right code would have been


Code:
SET OutputRoot.MQMD.MsgId = MQMI_NONE;


as clearly stated by zpat.
The field is of type BLOB and length 24 bytes. So a blank string won't do it and a null value, the way you assigned it, would remove the field from the MQMD record... Don't know how the parser would interpret that... probably choke on it and throw an exception...

Have fun
_________________
MQ & Broker admin
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 » WebSphere Message Broker (ACE) Support » MQOutput generating new message id problem
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.