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 » How can I send COD when the sender of message don't want?

Post new topic  Reply to topic
 How can I send COD when the sender of message don't want? « View previous topic :: View next topic » 
Author Message
danielcruzq
PostPosted: Mon Jan 07, 2008 11:43 am    Post subject: How can I send COD when the sender of message don't want? Reply with quote

Newbie

Joined: 19 Jul 2007
Posts: 6

I'd like to send COD in all messages I receive. I'm Using JMS IBM API...

The sender of message don't wanna I send COD, but I want send the COD. How can I make this?

the code I using..... its don't send the COD...

MQQueue fila = (MQQueue) session.createQueue(nomeFila);
fila.setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ);

// Obtendo as mensagens
MQQueueReceiver queueReceiver = (MQQueueReceiver) session.createReceiver(fila);

JMSMessage inMessage = (JMSMessage) queueReceiver.receiveNoWait();

if (inMessage != null) {
inMessage.acknowledge();
}

session.commit();
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Jan 07, 2008 11:54 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

COD is sent by the qmgr, not by you.

Unless you manually build a COD message and put it on the replytoqueue.

But if the sender doesn't want it, or they don't specify a replytoqueue, then you're only making trouble for yourself.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jan 08, 2008 4:02 am    Post subject: Re: How can I send COD when the sender of message don't want Reply with quote

Grand High Poobah

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

danielcruzq wrote:
I'd like to send COD in all messages I receive.


Why? MQ is an asyncronous, assured delivery system and doing confirmations is always a bit suspect (there have been many discussions on the subject, the search button is your friend), but simply put if the confirmation doesn't turn up does that mean the message never made it or the confirmation got lost?

In your specific instance the "why" becomes more serious - if the sender isn't wanting or expecting COD who's processing the messages? Aside from the requirement to clear out all this unsolicited COD at some point, what value are they adding?

And as my valued associate correctly points out, if the sender hasn't set a reply to queue because they expect no reply, where would you send the COD?
_________________
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 » How can I send COD when the sender of message don't want?
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.