You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Raul Kripalani (JIRA)" <ji...@apache.org> on 2012/10/09 22:16:02 UTC

[jira] [Comment Edited] (CAMEL-5696) camel-mongodb save operation should put have configurable option to put WriteResult in header

    [ https://issues.apache.org/jira/browse/CAMEL-5696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472706#comment-13472706 ] 

Raul Kripalani edited comment on CAMEL-5696 at 10/9/12 8:14 PM:
----------------------------------------------------------------

We could call this option {{writeResultAsHeader}} (false by default), and the header could be named {{CamelMongoDbWriteResult}}.

Not only should it apply to the save operation, but also to all write operations in general.

Beware that the result is always returned in an OUT message, and this must remain unchanged to preserve endpoint semantics. If {{writeResultAsHeader}} is enabled, we would copy the IN body to the OUT body. 

In fact, now that I look at the source, the camel-mongodb component should also transfer all headers from the IN message to the OUT message. Currently I think they are lost.
                
      was (Author: raulvk):
    We could call this option {{writeResultAsHeader}} (false by default), and the header could be named {{CamelMongoDbWriteResult}}.

Not only should it apply to the save operation, but also to all write operations in general.

Beware that the result is always returned in an OUT message, and this must remain unchanged to preserve endpoint semantics. If {{writeResultAsHeader}} is enabled, we would copy the IN body to the OUT body. 

In fact, now that I look at the source, the camel-mongodb component should also transfer all headers from the IN message to the OUT message. Currently they I think are lost.
                  
> camel-mongodb save operation should put have configurable option to put WriteResult in header
> ---------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5696
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5696
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-mongodb
>    Affects Versions: 2.10.1
>         Environment: Windows 7, Camel 2.10.1, MongoDB 2.7.3
>            Reporter: Mark Webb
>            Priority: Minor
>              Labels: features
>             Fix For: 2.11.0
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> I would like a configurable option to put the WriteResult from a mongodb save into the Exchange header and keep the input message to be the same as the output message.  
> If a user wants to put the update in the processing of data and continue more processing of the data they won't be able to do so because the data is lost and replaced with a WriteResult object.
> There are EIP workarounds for this, but a simple configuration option would work in this case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira