You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by wrusch <wr...@loftware.com> on 2015/05/06 16:41:25 UTC

Camel Mail mapMailMessage flag ignored

I am testing with camel-mail 2.14.

I am testing both pop3 and imap email consumers.

When i toggle the mapMailMessage flag nothing changes at all with the
message.

Additionally, 
pop3 never maps the message 

imap always maps the message

here are examples of my tested URIs (the only thing i changed between tests
was the mapMailMessage flag for each protocol.

pop3s://camel-test@localdomain:110?closeFolder=true&connectionTimeout=30000&consumer.delay=6000&consumer.initialDelay=1000&contentType=text%2Fplain&disconnect=false&fetchSize=-1&mapMailMessage=true&maxMessagesPerPoll=0&password=password&protocol=pop3&delete=true

imaps://camel-test@localdomain:143?closeFolder=true&connectionTimeout=30000&consumer.delay=6000&consumer.initialDelay=1000&contentType=text%2Fhtml&delete=true&disconnect=false&fetchSize=-1&folderName=INBOX&mapMailMessage=false&maxMessagesPerPoll=0&password=password&peek=true&protocol=imap&searchTerm.unseen=true&unseen=true

Am I just doing something wrong?



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Mail-mapMailMessage-flag-ignored-tp5766767.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Mail mapMailMessage flag ignored

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

I found a spot for improving
https://issues.apache.org/jira/browse/CAMEL-8779

Thanks for spotting this.

On Sun, May 17, 2015 at 8:37 AM, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> Yeah the uow copy would cause the message to be initialized. You can
> however turn off allowUseOriginalMessage which is what Camel also
> recommends if you dont need that functionality, and the copy is not
> needed.
>
> On Wed, May 6, 2015 at 6:36 PM,  <wr...@loftware.com> wrote:
>> Can you tell me what I would look for in the exchange to tell the difference.
>>
>> At the very first line of the very first processor coming directly off of the imap endpoint, I put a debug break point.
>>
>> This is absolutely the first place in the code where I as a camel user can do anything with the exchange.
>>
>> With mapMailMessage set to false, I inspect the message and every single mail message header is already mapped to the MailMessage headers map.
>>
>> When I look further up the code stream I see that the mapping is happening always during the construction of DefaultUnitOfWork while doing internal standard advice as part of the CamelInternalProcessor. At which point it is doing an message copy.
>>
>> There is no way to avoid this (at least that I know of) and there is obviously nothing mail client specific code at that point of the exchange.
>>
>> Since the configuration point changes nothing in how the exchange is processed I will assume this is bug resulting in a completely dead and useless configuration point.
>>
>>
>>
>> -----Original Message-----
>> From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
>> Sent: Wednesday, May 06, 2015 11:35 AM
>> To: users@camel.apache.org
>> Subject: Re: Camel Mail mapMailMessage flag ignored
>>
>> Hi
>>
>> Read the description. Its about whether mail message headers and body is mapped to Camel Message Body / Headers automatic or lazy-on-demand.
>>
>> From outside you cant tell the difference unless you work with the low level message api.
>>
>> On Wed, May 6, 2015 at 5:32 PM, wrusch <wr...@loftware.com> wrote:
>>> I expect the flag to do something?
>>>
>>> I really don't understand your reply.
>>>
>>> No matter what value I set, nothing changes.
>>>
>>> For pop3 the mapping happens 'never'
>>> For imap the mapping happens 'always'
>>>
>>> In either case the flag does nothing at all.
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://camel.465427.n5.nabble.com/Camel-Mail-mapMailMessage-flag-ignor
>>> ed-tp5766767p5766771.html Sent from the Camel - Users mailing list
>>> archive at Nabble.com.
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> Email: cibsen@redhat.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>> hawtio: http://hawt.io/
>> fabric8: http://fabric8.io/
>>
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: Camel Mail mapMailMessage flag ignored

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah the uow copy would cause the message to be initialized. You can
however turn off allowUseOriginalMessage which is what Camel also
recommends if you dont need that functionality, and the copy is not
needed.

On Wed, May 6, 2015 at 6:36 PM,  <wr...@loftware.com> wrote:
> Can you tell me what I would look for in the exchange to tell the difference.
>
> At the very first line of the very first processor coming directly off of the imap endpoint, I put a debug break point.
>
> This is absolutely the first place in the code where I as a camel user can do anything with the exchange.
>
> With mapMailMessage set to false, I inspect the message and every single mail message header is already mapped to the MailMessage headers map.
>
> When I look further up the code stream I see that the mapping is happening always during the construction of DefaultUnitOfWork while doing internal standard advice as part of the CamelInternalProcessor. At which point it is doing an message copy.
>
> There is no way to avoid this (at least that I know of) and there is obviously nothing mail client specific code at that point of the exchange.
>
> Since the configuration point changes nothing in how the exchange is processed I will assume this is bug resulting in a completely dead and useless configuration point.
>
>
>
> -----Original Message-----
> From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
> Sent: Wednesday, May 06, 2015 11:35 AM
> To: users@camel.apache.org
> Subject: Re: Camel Mail mapMailMessage flag ignored
>
> Hi
>
> Read the description. Its about whether mail message headers and body is mapped to Camel Message Body / Headers automatic or lazy-on-demand.
>
> From outside you cant tell the difference unless you work with the low level message api.
>
> On Wed, May 6, 2015 at 5:32 PM, wrusch <wr...@loftware.com> wrote:
>> I expect the flag to do something?
>>
>> I really don't understand your reply.
>>
>> No matter what value I set, nothing changes.
>>
>> For pop3 the mapping happens 'never'
>> For imap the mapping happens 'always'
>>
>> In either case the flag does nothing at all.
>>
>>
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/Camel-Mail-mapMailMessage-flag-ignor
>> ed-tp5766767p5766771.html Sent from the Camel - Users mailing list
>> archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

RE: Camel Mail mapMailMessage flag ignored

Posted by wr...@loftware.com.
Can you tell me what I would look for in the exchange to tell the difference.

At the very first line of the very first processor coming directly off of the imap endpoint, I put a debug break point.

This is absolutely the first place in the code where I as a camel user can do anything with the exchange.

With mapMailMessage set to false, I inspect the message and every single mail message header is already mapped to the MailMessage headers map.

When I look further up the code stream I see that the mapping is happening always during the construction of DefaultUnitOfWork while doing internal standard advice as part of the CamelInternalProcessor. At which point it is doing an message copy.

There is no way to avoid this (at least that I know of) and there is obviously nothing mail client specific code at that point of the exchange.

Since the configuration point changes nothing in how the exchange is processed I will assume this is bug resulting in a completely dead and useless configuration point. 



-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Sent: Wednesday, May 06, 2015 11:35 AM
To: users@camel.apache.org
Subject: Re: Camel Mail mapMailMessage flag ignored

Hi

Read the description. Its about whether mail message headers and body is mapped to Camel Message Body / Headers automatic or lazy-on-demand.

From outside you cant tell the difference unless you work with the low level message api.

On Wed, May 6, 2015 at 5:32 PM, wrusch <wr...@loftware.com> wrote:
> I expect the flag to do something?
>
> I really don't understand your reply.
>
> No matter what value I set, nothing changes.
>
> For pop3 the mapping happens 'never'
> For imap the mapping happens 'always'
>
> In either case the flag does nothing at all.
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-Mail-mapMailMessage-flag-ignor
> ed-tp5766767p5766771.html Sent from the Camel - Users mailing list 
> archive at Nabble.com.



--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: Camel Mail mapMailMessage flag ignored

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Read the description. Its about whether mail message headers and body
is mapped to Camel Message Body / Headers automatic or lazy-on-demand.

>From outside you cant tell the difference unless you work with the low
level message api.

On Wed, May 6, 2015 at 5:32 PM, wrusch <wr...@loftware.com> wrote:
> I expect the flag to do something?
>
> I really don't understand your reply.
>
> No matter what value I set, nothing changes.
>
> For pop3 the mapping happens 'never'
> For imap the mapping happens 'always'
>
> In either case the flag does nothing at all.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Mail-mapMailMessage-flag-ignored-tp5766767p5766771.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: Camel Mail mapMailMessage flag ignored

Posted by wrusch <wr...@loftware.com>.
I expect the flag to do something?

I really don't understand your reply.

No matter what value I set, nothing changes.

For pop3 the mapping happens 'never'
For imap the mapping happens 'always'

In either case the flag does nothing at all.



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Mail-mapMailMessage-flag-ignored-tp5766767p5766771.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Mail mapMailMessage flag ignored

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

What would you expect to happen? The option is a flag to turn lazy
mapping on or off.

On Wed, May 6, 2015 at 4:41 PM, wrusch <wr...@loftware.com> wrote:
> I am testing with camel-mail 2.14.
>
> I am testing both pop3 and imap email consumers.
>
> When i toggle the mapMailMessage flag nothing changes at all with the
> message.
>
> Additionally,
> pop3 never maps the message
>
> imap always maps the message
>
> here are examples of my tested URIs (the only thing i changed between tests
> was the mapMailMessage flag for each protocol.
>
> pop3s://camel-test@localdomain:110?closeFolder=true&connectionTimeout=30000&consumer.delay=6000&consumer.initialDelay=1000&contentType=text%2Fplain&disconnect=false&fetchSize=-1&mapMailMessage=true&maxMessagesPerPoll=0&password=password&protocol=pop3&delete=true
>
> imaps://camel-test@localdomain:143?closeFolder=true&connectionTimeout=30000&consumer.delay=6000&consumer.initialDelay=1000&contentType=text%2Fhtml&delete=true&disconnect=false&fetchSize=-1&folderName=INBOX&mapMailMessage=false&maxMessagesPerPoll=0&password=password&peek=true&protocol=imap&searchTerm.unseen=true&unseen=true
>
> Am I just doing something wrong?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Mail-mapMailMessage-flag-ignored-tp5766767.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/