You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2023/01/30 12:42:00 UTC

[jira] [Resolved] (CAMEL-18986) camel-core - ProducerTemplate send exchange should set from endpoint if null

     [ https://issues.apache.org/jira/browse/CAMEL-18986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-18986.
---------------------------------
    Resolution: Won't Fix

fromEndpoint is only set when its a consumer/endpoinnt that creates the exchange, and not when its pre-created via ExchangeBuilder

> camel-core - ProducerTemplate send exchange should set from endpoint if null
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-18986
>                 URL: https://issues.apache.org/jira/browse/CAMEL-18986
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 3.20.1
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 3.21.0, 4.0-M2, 4.0
>
>
> These two are not the same
> {code}
> 	@Test
> 	@DisplayName("This one is ok")
> 	@Order(2)
> 	public void repoCaseOk() throws Exception{
> 		producer1.sendBody("hello");
> 	}
> 	@Test
> 	@DisplayName("This one fails with 3.20.1")
> 	@Order(2)
> 	public void repoCaseFail() throws Exception{
> 		var exchange=
> 			ExchangeBuilder
> 				.anExchange(context)
> 				.withBody  ("hello")
> 				.build     ();
> 		logger.info("From endpoint: {}",exchange.getFromEndpoint());
> 		producer1.send(exchange);
> 	}
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)