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 » Duplicate properties in usr folder of RFH2 header

Post new topic  Reply to topic
 Duplicate properties in usr folder of RFH2 header « View previous topic :: View next topic » 
Author Message
19tharish
PostPosted: Tue Jul 23, 2019 9:25 am    Post subject: Duplicate properties in usr folder of RFH2 header Reply with quote

Newbie

Joined: 23 Jul 2019
Posts: 7

Can we have duplicate properties in usr folder of RFH2 header as below:
Code:
Internal.Control.Data.Flow.name=OTP
Internal.Control.Data.Flow.name=AIM
Internal.Control.Data.Flow.name=BIP


If I put the message to a queue with above usr properties using the RFHUtil, I get the message as shown below:
Code:
Internal.Control.Data.Flow[1].name=OTP
Internal.Control.Data.Flow[2].name=AIM
Internal.Control.Data.Flow[3].name=BIP


When browsed the message in IBM MQ, it is shown as below:
Code:
<usr><Internal><Control><Data>
<Flow><name>OTP</name></Flow>
<Flow><name>AIM</name></Flow>
<Flow><name>BIP</name></Flow>
</Data></Control></Internal></usr>


Is this correct?

But when I referred to the IBM MQ 7.5 doc, found mixed statements on this:
1. "Not more than one usr folder must be present in an MQRFH2. Properties in the usr folder must occur no more than once."

and

2. "Alternatively you can create multiple chained MQRFH2 headers, each containing multiple NameValueData fields."

Which is correct?
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jul 23, 2019 9:44 am    Post subject: Re: Duplicate properties in usr folder of RFH2 header Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

19tharish wrote:
Is this correct?


Yes. That's 2 ways to describe the same data.

19tharish wrote:
But when I referred to the IBM MQ 7.5 doc, found mixed statements on this:


Provide the links to those statements, and consider not using v7.5 which has been obsolete for some time.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
19tharish
PostPosted: Tue Jul 23, 2019 10:05 am    Post subject: Duplicate properties in usr folder of RFH2 header Reply with quote

Newbie

Joined: 23 Jul 2019
Posts: 7

Below is the 9.0 link:
https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.ref.dev.doc/q099320_.htm

So you mean we support duplicate properties in the usr folder?
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jul 23, 2019 10:50 am    Post subject: Re: Duplicate properties in usr folder of RFH2 header Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

19tharish wrote:
So you mean we support duplicate properties in the usr folder?


No. First line of the link you posted:

Quote:
NameValueData is a variable length field that contains a folder containing name-value pairs or message properties


If it contains properties (again from the link you posted):

Quote:
If you add the attribute 'content=properties' to the folder name tag, the folder becomes a property folder


then you may not specify duplicates.

You can have as many name / value pairs as you want.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
19tharish
PostPosted: Tue Jul 23, 2019 11:05 am    Post subject: Duplicate properties in usr folder of RFH2 header Reply with quote

Newbie

Joined: 23 Jul 2019
Posts: 7

Coming to my example:
When I add the usr properties as:
Quote:
Internal.Control.Data.Flow.name=OTP
Internal.Control.Data.Flow.name=AIM
Internal.Control.Data.Flow.name=BIP


Are they treated as name/value pairs or properties?

Totally confused about how to put a message in Queue with name/value pairs and properties.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jul 23, 2019 11:11 am    Post subject: Re: Duplicate properties in usr folder of RFH2 header Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

19tharish wrote:
Are they treated as name/value pairs or properties?


Have you set "content=properties" as indicated in the section I quoted from the link you posted?

19tharish wrote:
Totally confused about how to put a message in Queue with name/value pairs and properties.


In return, I'm totally confused why you're using an RFH2 with v9.

(Given that you responded with the v9 link, I'm assuming you use v9)
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
19tharish
PostPosted: Tue Jul 23, 2019 11:49 am    Post subject: Duplicate properties in usr folder of RFH2 header Reply with quote

Newbie

Joined: 23 Jul 2019
Posts: 7

"content=properties" can be set to NameValueData string (XML-like syntax). But when I use a tool like RFHUtil to specify them with dots as Internal.Control.Data.Flow.name=OTP
how can I distinguish between a name/value pair and property?

Also, can u please let me know the correct/recommended way when you mean "why you're using an RFH2 with v9"?
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jul 24, 2019 4:55 am    Post subject: Re: Duplicate properties in usr folder of RFH2 header Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

19tharish wrote:
Also, can u please let me know the correct/recommended way when you mean "why you're using an RFH2 with v9"?


The information you're recording should be held as message properties. An RFH2 is still a supported artifact, but message properties are intended to replace it and have a number of advantges. Principle among these is that you can access this information without reading the message from the queue & that it aligns MQ with the JMS standard. Not only does this make communication with JMS applications easier but it allows JMS selectors to be applied directly to an MQ hosted queue.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
19tharish
PostPosted: Wed Jul 24, 2019 9:28 am    Post subject: Duplicate properties in usr folder of RFH2 header Reply with quote

Newbie

Joined: 23 Jul 2019
Posts: 7

Thank you. I'm using RFH2 for backward compatibility. We also use 7.5 version.

To distinguish between a name/value pair and property, can we go with the datatype?
A property can be a boolean, a byte string, a character string, or a floating-point or integer number but name/value pair can be just a string.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jul 24, 2019 9:34 am    Post subject: Re: Duplicate properties in usr folder of RFH2 header Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

19tharish wrote:
I'm using RFH2 for backward compatibility.


Why not get the queue manager to manage that?

19tharish wrote:
We also use 7.5 version.


Trying to work the RFH2 is probably the least of your problems then. That was retired Dec 2016, and was declared dead April 2018. Make sure whoever managed your business risk knows about its continued use.

19tharish wrote:
To distinguish between a name/value pair and property, can we go with the datatype?
A property can be a boolean, a byte string, a character string, or a floating-point or integer number but name/value pair can be just a string.


Of course not.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
19tharish
PostPosted: Wed Jul 24, 2019 10:04 am    Post subject: Re: Duplicate properties in usr folder of RFH2 header Reply with quote

Newbie

Joined: 23 Jul 2019
Posts: 7

Vitor wrote:
Why not get the queue manager to manage that?

How do we do that? I'm new to IBM MQ and still not clear on this.

Vitor wrote:
Of course not.

How to distinguish then so that I can parse them as a list and number/tag them as shown below?
Code:
Internal.Control.Data.Flow[1].name=OTP
Internal.Control.Data.Flow[2].name=AIM
Internal.Control.Data.Flow[3].name=BIP
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jul 24, 2019 11:00 am    Post subject: Re: Duplicate properties in usr folder of RFH2 header Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

19tharish wrote:
Vitor wrote:
Why not get the queue manager to manage that?

How do we do that? I'm new to IBM MQ and still not clear on this.


See here.

I also took the opportunity to see if message properties were introduced in v7.5 or v8 - it was v7.5. So you've no need for "backwards compatibility".

19tharish wrote:

How to distinguish then so that I can parse them as a list and number/tag them as shown below?
Code:
Internal.Control.Data.Flow[1].name=OTP
Internal.Control.Data.Flow[2].name=AIM
Internal.Control.Data.Flow[3].name=BIP


They are a list, be they name/value pairs or properties, so I don't understand your question.

They are distinct, so you don't need to number them to "tag" them.

If you want to number them to preserve their order, then that sounds like affinity and is a poor design.

Now (based entirely on the names) it sounds a lot like you're trying to build a workflow where the message goes to "OTP", then to "AIM", then to "BIP". If I'm right, why are you not sending 3 messages and aggregating the results? If I'm not, what exactly are you trying to do?
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » Duplicate properties in usr folder of RFH2 header
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.