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 » JMS and setting MessageID

Post new topic  Reply to topic
 JMS and setting MessageID « View previous topic :: View next topic » 
Author Message
marcin.kasinski
PostPosted: Sat Apr 28, 2007 11:59 am    Post subject: JMS and setting MessageID Reply with quote

Sentinel

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

Hi,

Do you know why I can not set MessageID with JMS ?

I red this is IBM JMS limitation.

My question is "why ?".

Why there is such limitation ?

Is there any reason ?
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Sat Apr 28, 2007 3:47 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The real question is - why do you need to set the MsgId?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
markt
PostPosted: Sat Apr 28, 2007 5:11 pm    Post subject: Reply with quote

Knight

Joined: 14 May 2002
Posts: 508

And the real reason is that the JMS specification REQUIRES that the msgid is a read-only property.
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Sat Apr 28, 2007 11:45 pm    Post subject: Reply with quote

Sentinel

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

jefflowrey wrote:
The real question is - why do you need to set the MsgId?


Yes,

I know this question.

My scenario is different

We have JMS server application.

When we send response we would like to read msgid of request and place it as msgid of reply.

We do like this with apps written with base classes.
We would like to do the same with JMS
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Sun Apr 29, 2007 4:35 am    Post subject: Reply with quote

Grand High Poobah

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

marcin.kasinski wrote:
jefflowrey wrote:
The real question is - why do you need to set the MsgId?


Yes,

I know this question.

My scenario is different

We have JMS server application.

When we send response we would like to read msgid of request and place it as msgid of reply.

We do like this with apps written with base classes.
We would like to do the same with JMS


Wrong pattern! The standard pattern for a request / Reply in JMS calls for the correlation Id to be passed into the response's correlationId if it is set. If the correlationId is not set the messageId gets moved into the response's correlationId.

So deal with it!

Any way messageId is supposed to be unique. With your way there is no uniqueness to the messageId anymore....
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Sun Apr 29, 2007 5:54 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It sounds like you're out of luck with JMS.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Sun Apr 29, 2007 9:27 am    Post subject: Reply with quote

Sentinel

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

fjb_saper wrote:

Wrong pattern! ...


Yes, yes, yes.

I know.

I found this pattern.
I'm trying to change it gradually.

It was just theoretical question.

Why I can do it with base classes but I can't with JMS.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Sun Apr 29, 2007 10:30 am    Post subject: Reply with quote

Grand High Poobah

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

marcin.kasinski wrote:
Why I can do it with base classes but I can't with JMS.


You still shouldn't do it with the base classes.

Identify replies with correlId.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Sun Apr 29, 2007 11:21 am    Post subject: Reply with quote

Sentinel

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

Hi Vitor,
It was just theoretical question.

Quote:
I found this pattern.
I'm trying to change it gradually.

It was just theoretical question.


Another my question ( still theoretical ) is:

Why with MQ base classes I can set messageID although everybody (me too) doesn't recommend it ?

Why does IBM MQ API allow to do it ?
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Sun Apr 29, 2007 11:43 pm    Post subject: Reply with quote

Grand High Poobah

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

marcin.kasinski wrote:

Why with MQ base classes I can set messageID although everybody (me too) doesn't recommend it ?

Why does IBM MQ API allow to do it ?


For the same reason my car allows me to accelerate to 120mph. It's very seldom a good idea, but there could be a set of exceptional circumstances where I need to. Road subsiding behind me due to earhtquake for instance. It's unlikely and would still not a good idea but it might just be the best option under the circumstances. Circumstances I'd look to change as soon as possible.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Mon Apr 30, 2007 12:05 am    Post subject: Reply with quote

Sentinel

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

Vitor wrote:

For the same reason my car allows me to accelerate to 120mph. It's very seldom a good idea, ...



Of course, I see.
You said it's very seldom a good idea.
Can you give me example when setting messageID is a good idea.

I personally can not find such example.

I'm trying to understand it.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Mon Apr 30, 2007 12:22 am    Post subject: Reply with quote

Grand High Poobah

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

Something like -

You're converting an existing fixed record length file based system to MQ. There's a key in the front of the file which the existing applications use to identify given records. You've no access to transformation technology (WMB or similar) and limited time or resources to recode the application.

Under these restrictive circumstances you might need to replace the file key with the msg id until you can re-architect the solution to eliminate this need, i.e. you've outrun the earthquake and the road's stopped collapsing.

Perhaps I should clarify my original comment.

Vitor wrote:
It's very seldom a good idea


A good idea is one that allows you to implement your project on time and functional. In the same way a good landing is one you can walk away from. Even if the plane's sitting on the runway because the wheels have collapsed.

Setting msg id is never a good idea in the sense of being clever.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
EddieA
PostPosted: Mon Apr 30, 2007 11:45 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

marcin.kasinski wrote:
Can you give me example when setting messageID is a good idea.

The CICS Bridge has some very specific requirements on MessageID and CorrelationID, to indentify psuedo-conversational transactions.

Cheers.
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Mon Apr 30, 2007 12:34 pm    Post subject: Reply with quote

Sentinel

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

I see,

I'm not familiar with CICS.

Thanks
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » JMS and setting MessageID
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.