[
https://issues.apache.org/jira/browse/CAMEL-17668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17852455#comment-17852455
]
Henrik edited comment on CAMEL-17668 at 6/24/24 11:45 AM:
----------------------------------------------------------
For others encountering this:
_WireTapDefinition.newExchange(Processor)_ is missing from Camel 3.16.0. It
was fixed for me by replacing this:
{code:java}
.wireTap(someUri)
.newExchange(MyProcessor())
.end()
{code}
... with this:
{code:java}
.wireTap(someUri).copy()
.onPrepare(MyProcessor())
.end()
{code}
It is somewhat described in the [Camel 3.16 upgrade guide|#_wiretap_eip]]:
{quote}Removed the new message mode as this functionality is better done by
using onPrepare processor in copy mode
{quote}
was (Author: monti):
[~davsclaus] I'm sorry to comment on a very old issue, but I finally in the
process of upgrading our old Camel 2.x stack. I haven't found any examples of
this, so: what should I replace `newExchange()` with in this instance?
{code:java}
exceptionErrorHandlers.forEach {
onException(it.exceptionToHandle)
.process(ErrorHandlerProcessor(provider(), it))
.wireTap(Endpoint.solrizeUri)
.newExchange(StatusMessage(STATUS_FAILED_KEY))
.end()
.handled(true)
.bean(providerFailedCounter, "inc()")
} {code}
> camel-core - WireTap - Remove function to tap as new body/header
> ----------------------------------------------------------------
>
> Key: CAMEL-17668
> URL: https://issues.apache.org/jira/browse/CAMEL-17668
> Project: Camel
> Issue Type: Improvement
> Components: camel-core, eip
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 3.16.0
>
>
> The wiretap should be for tapping the message as-is, and not to create new
> messages.
> Otherwise the onPrepare processor can be used to customize a new message with
> copy option enabled.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)