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 » Trigger JMSCMQ1050

Post new topic  Reply to topic
 Trigger JMSCMQ1050 « View previous topic :: View next topic » 
Author Message
edmondh
PostPosted: Thu Nov 11, 2010 8:06 am    Post subject: Trigger JMSCMQ1050 Reply with quote

Novice

Joined: 17 Feb 2006
Posts: 14
Location: London

Hi there.

I am trying to trigger the above error.

I am extending my current landscape with a new JMS client. Currently I send MQRFH2 message throughout my WMQ messaging back bone.

I want to write a JMS client to throw a JMSCMQ1050 error when a non MQRFH2 message arrive to my destination queue.

I am using WMQv7 & Websphere MQ classes for JMS. Are there come connection factory properties I can set.

any advice?

Rgds
Ed
_________________
Thank you for your time
Ed
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Nov 11, 2010 11:17 am    Post subject: Re: Trigger JMSCMQ1050 Reply with quote

Grand High Poobah

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

edmondh wrote:

I want to write a JMS client to throw a JMSCMQ1050 error when a non MQRFH2 message arrive to my destination queue.
Rgds
Ed

Redefine your problem. What you wrote makes absolutely no sense.
  • JMS will understand the message being read whether it has an RFH header or not. The scope of message types may be somewhat limited to BytesMessage and TextMessage only if there is no RFH2 though...
  • V7 JMS should understand the properties on the message whether they are V7 style or in an RFH <usr> folder.

So what is your rationale behind raising an error if there is no RFH header?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
edmondh
PostPosted: Fri Nov 12, 2010 4:42 am    Post subject: Reply with quote

Novice

Joined: 17 Feb 2006
Posts: 14
Location: London

OK let me add more details.

We have a large middleware landscape. All messages are MQRFH2 using meta data in usr folder for routing etc. We need to implement a JMS client at a new endsite. As part of development we want to put in place the best way to handle bad or poison messages. So let me expand more.....

We have three common scenarios.

Good data Message is read & successfully processed to target application.
Bad data Message is read. two options here.
1 We may read bad message, log the bad message & disregard.
2 Or we may back out & use MQ backout threshold to send to a back out queue.
Yet to decide approach here.

Finally, what about a 'bad' message. What if incoming message is MQSTR. From documentation I have come across an error code JMSCMQ1050. I was hoping to configure my conectionfactory to explicity throw a JMSException with is error code if inbound message was not MQRFH2.

JMSCMQ1050 is detailed here http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=/com.ibm.mq.javadoc.doc/WMQJMSClasses/errorcodes.html


Any advice, am i over Engineering this? Has anyone experience with this error code?

Rgds
Ed
_________________
Thank you for your time
Ed
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Nov 12, 2010 12:07 pm    Post subject: Reply with quote

Grand High Poobah

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

edmondh wrote:
OK let me add more details.

We have a large middleware landscape. All messages are MQRFH2 using meta data in usr folder for routing etc. We need to implement a JMS client at a new endsite. As part of development we want to put in place the best way to handle bad or poison messages. So let me expand more.....

We have three common scenarios.

Good data Message is read & successfully processed to target application.
Bad data Message is read. two options here.
1 We may read bad message, log the bad message & disregard.
2 Or we may back out & use MQ backout threshold to send to a back out queue.
Yet to decide approach here.

Finally, what about a 'bad' message. What if incoming message is MQSTR. From documentation I have come across an error code JMSCMQ1050. I was hoping to configure my conectionfactory to explicity throw a JMSException with is error code if inbound message was not MQRFH2.

JMSCMQ1050 is detailed here http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=/com.ibm.mq.javadoc.doc/WMQJMSClasses/errorcodes.html


Any advice, am i over Engineering this? Has anyone experience with this error code?

Rgds
Ed

Ok JMSCMQ1050 is according to doc The MQRFH2 header has an incorrect format
I would have thought you'd have a corresponding RC code in the linked exception for that... maybe not.
Usually I'd only see those if you had to build the RFH without using the JMS classes. Bad byte alignment, length etc ...
If your whole landscape is JMS/XMS, I'd say you're over-engineering this. If it is just to catch this exception, have it go the way of a poison message (which it will be to JMS).

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
edmondh
PostPosted: Thu Nov 25, 2010 10:05 am    Post subject: Reply with quote

Novice

Joined: 17 Feb 2006
Posts: 14
Location: London

Therein lies the issue, our landscape is NOT pure JMS. I just want to cover 2 use case. 1 bad data & 2 Bad message. I will get to end of this & keep u informed.

Maybe solution will help better describe problem.
_________________
Thank you for your time
Ed
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 » Trigger JMSCMQ1050
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.