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 » Sending mail through WMB6.1

Post new topic  Reply to topic
 Sending mail through WMB6.1 « View previous topic :: View next topic » 
Author Message
Harshalw
PostPosted: Wed Aug 27, 2008 12:15 am    Post subject: Sending mail through WMB6.1 Reply with quote

Voyager

Joined: 23 Jul 2008
Posts: 77

I have the requirement of sending the mail in case of failure or exception.
I am using WMB6.1

Please let me know the ways through which i can send an mail. Is there some cmd for that in WMB like AIX ?

Thanks
Harshalw
Back to top
View user's profile Send private message
Gaya3
PostPosted: Wed Aug 27, 2008 12:46 am    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

there is a plugin node, where you can use for sending emails from broker flow,

or use, monitoring tools for the same, or come up with a script to do the same.
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
Harshalw
PostPosted: Wed Aug 27, 2008 1:11 am    Post subject: Reply with quote

Voyager

Joined: 23 Jul 2008
Posts: 77

I am new to WMB.. so have lots of doubt..

By Plugin u meant Email node? There i am facing prb with SMTP server name property for email node.

By script you mean Shell script on AIX? Or through WMb also we can run the scripts?

what are different monitoring tools ?
Back to top
View user's profile Send private message
Maximreality
PostPosted: Wed Aug 27, 2008 1:16 am    Post subject: Reply with quote

Acolyte

Joined: 04 Jun 2004
Posts: 65
Location: Copenhagen

How are you monitoring the message broker and MQ?

Sending e-mail when something goes wrong triggered by the broker itself is not a very robust solution. You should rather have the tool monitoring the broker and MQ that sends out e-mail in case something goes wrong.

/Rasmus
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Aug 27, 2008 1:28 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

v6.1 has an EmailOutput node, built-in.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Aug 27, 2008 3:49 am    Post subject: Re: comment by Maximumreality Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

I use an error reporting subflow that depending upon how its configured, will send and email, write a .zip file or both.
I collect data about the exception ( including the original message and the exceptionlist), package it into an email and send it to support. You can also add specific code to save portions of the Environment (especially useful for looking at DB Select results) into the .zip output.

Having a tool such as BMC, Tivoli or QPasa is all very well and yes you can configure them to send alerts when something goes wrong. But if it is due to a coding problem in the flow, how else do you get the data out of the flow so that a proper investigation into the cause of the error can be undertaken.

Using this method, I recently found a problem where the MQMD.PutTime was causing an error in an insert into a DB2 Table. When the time has ZERO Milliseconds, the cast to char of it is truncated so that if you concanenate it with the MQMD.PutDate, it is not in the correct format to be inserted into a timestamp field in the database.

You may indeed have other ways to sort out why your flows throw wobblies. But at least mine allows me to take the message that failed and replay it on a test system for a full detailed investigation into the problem or even god forbid, include it all in a PMR for sending to IBM


_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
Harshalw
PostPosted: Wed Aug 27, 2008 9:47 pm    Post subject: Reply with quote

Voyager

Joined: 23 Jul 2008
Posts: 77

I Just need to send a e-mail to operation team. This is part of requirement. When i am using the Emailoutput node, what should i put in SMTP server and port ?
Back to top
View user's profile Send private message
Sridar
PostPosted: Wed Aug 27, 2008 10:19 pm    Post subject: Reply with quote

Acolyte

Joined: 14 May 2006
Posts: 72
Location: Chennai, India

You have to get the SMTP Server and port number which the Operation team's email use.

If it is your client you have to get it from them if it is your own company then you can get it from your IT helpdesk.

generally the SMTP Port will be 25 but it is good to check.
_________________
Thanks and Regards
Sridar
Back to top
View user's profile Send private message
sandeep9678
PostPosted: Thu Aug 28, 2008 12:08 am    Post subject: Reply with quote

Apprentice

Joined: 04 Aug 2008
Posts: 41
Location: India

you can do the configuration like below in Compute Node.
OutputLocalEnvironment.Destination.Email.SMTPServer = <SMTPServerdetails>

This means you can create it as UDP also giving your client to change the SMTP Server details, if he want to hide it from development team.
_________________
Cheers,
Sandeep
Back to top
View user's profile Send private message
Maximreality
PostPosted: Thu Aug 28, 2008 12:37 am    Post subject: Re: comment by smdavies99 Reply with quote

Acolyte

Joined: 04 Jun 2004
Posts: 65
Location: Copenhagen

You need to differ beteween monitoring and exception handling.
For exception handling i would rather use MQ (or a database) to log the failed messages and if everything screws up have a failsafe where the message is written to the syslog.

For monitoring i prefer an external tool that is not dependend on the broker working properly.

At one customer we build a solution where the messages are logged in DB2 with the original message, exception tree and custom parameters.
For each message type we had a style sheet that would parse it and give the 1st line support an idea of what the problem was.

If you have a low volume system sending e-mails can be ok...., i would not do it
Back to top
View user's profile Send private message
darring
PostPosted: Thu Aug 28, 2008 1:53 am    Post subject: New line is being appended in Attatchment XML Reply with quote

Apprentice

Joined: 14 Jun 2008
Posts: 36

Hello,
Though I am using email plugin node on MB6 on Solaris, I thought of posting my problem to this topic. I am trying to send email in case a message is failing in my flows. The email generating part is a subflow as shown below

My Flow LayOut:
Input Terminal -> Compute 1 -> Compute 2 -> email plugin
-> Output Queue


Problem: Input messages are XML. In case of failure I am getting the input XML and ExceptionList through Input Terminal. In Compute 1 I am doing some other stuffs(Saving some Environment variables and other required things) and in Compute 2 I am using the following ESQL to create attachment:

DECLARE exceptionMessageBlob BLOB;
DECLARE options INTEGER FolderBitStream;
CREATE LASTCHILD of Environment.XML DOMAIN('XML') Name 'InputMessage';
SET Environment.XML.InputMessage = Environment.Variables.InputMessage;
SET exceptionMessageBlob = ASBITSTREAM(Environment.XML.InputMessage OPTIONS options);
SET Environment.XML = NULL;
DECLARE REF_Attachment REFERENCE TO REF_OutputMessage.Encoding7Bit;
CREATE FIELD REF_OutputMessage.Encoding7Bit AS REF_Attachment;
SET REF_Attachment.(XML.Attribute)ContentType = 'text/plain';
SET REF_Attachment.(XML.Attribute)Name = 'FailedMessage.xml';
SET REF_Attachment.(XML.CDataSection) = CAST(exceptionMessageBlob AS CHARACTER CCSID InputRoot.MQMD.CodedCharSetId);

It's sending out the email properly. But when I am trying to open the xml from the email, I can see there are few new line characters has been appended. First I thought that the new line character is being appended by ASBITSTREAM function, but looks like I am wrong, because, when I looked at the messages being dumped in the Output Queue of my subflow, the Cdata Section, I got the input XML. So I am not sure where the new line character is being appended in the attatchment?????

Thanks in Advance
Back to top
View user's profile Send private message
darring
PostPosted: Thu Aug 28, 2008 4:16 am    Post subject: Looks like I have some news Reply with quote

Apprentice

Joined: 14 Jun 2008
Posts: 36

Hi,
Looks llike I have something to share. I was looking at the /tmp/DebugSMTPClient.txt file and found
"===> Sends the BODY field (MIME plain)
-> SmtpSend, Buffer = Exception occured in flow TestErrorHandling while processing the attached messag, BufferSize = 1512
--> linelength 1000, offset i = 997"
It seemed to me that while creating the attachment it's
that the attachment is being formed part by part. Each time a part of length 1000 is being formed. This thing is defined in smtp.h by the onstant MAXIMUM_TOTAL_LENGTH_TEXT_LINE. So I guess if I can rebuild the lil file modifying the value of the constant to a really big value, will solve my problem. Could anybody tell me how can I prepare the SenMailPlugin.lil file in Solaris environment????

Thanks
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Aug 28, 2008 4:34 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You should NOT be using the sendMail node in Broker 6.1.

You *SHOULD* be using the EmailOutput node that *comes* with Broker 6.1.
Back to top
View user's profile Send private message
darring
PostPosted: Thu Aug 28, 2008 5:25 am    Post subject: Thanks for the Reply Reply with quote

Apprentice

Joined: 14 Jun 2008
Posts: 36

Hi,
Thanks for the reply, but I at the moment I am using MB 6. Not sure when I am going to get MB 6.1

Thanks
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 » WebSphere Message Broker (ACE) Support » Sending mail through WMB6.1
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.