The Message-Id: header is suppose to be unique for every email.

On Mon, Dec 13, 2010 at 8:53 AM, Max <[email protected]> wrote:

> Hi,
>
> OK, that makes sense.  How could I make a GAE mail handler idempotent?  Is
> there any unique identifier associated with an inbound email that I can
> reference, or will I truly need to build the ".equals" logic to analyze the
> email elements (including attachments) to know if it is a duplicate?
>
> thanks
> MG
>
> On Dec 12, 2010, at 11:34 PM, Didier Durand wrote:
>
> > Hi,
> >
> > Yes, your code gets (probably) executed more than once because it is
> > scheduled as a task in a task queue defined in the architecture of
> > GAE.
> >
> > As such your code as to be idempotent (the word you were looking for)
> > because it can be executed multiple times: Google highly recommend to
> > guarantee to work on a true idempotence of the code in such cases.
> >
> > regards
> >
> > didier
> >
> > On Dec 12, 10:22 pm, Max <[email protected]> wrote:
> >> Hi,
> >>
> >> My application receives emails and performs duties based on the content
> of the email.  I'm sometimes having an issue (< 5%) where a single email
> that goes in to the application causes the handler to execute twice.  Is
> this an issue with GAE that would be intended to be fixed?  Or is the nature
> of the environment one that requires writing code that can be executed
> multiple times without negative consequences (can't remember the word for
> this)?
> >>
> >> If I need to write code to support running multiple times over the same
> inbound email, are there any suggestions on how to manage this?  I'm
> assuming I'd need to come up with an ".equals" method that makes sure it
> isn't a repeat of a prior message.  Any advice?
> >>
> >> thanks!
> >> MG
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> > To post to this group, send email to
> [email protected].
> > To unsubscribe from this group, send email to
> [email protected]<google-appengine-java%[email protected]>
> .
> > For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine-java%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to