Hello. I am sending an exchange with a FluentProducerTemplate to a pulsar
endpoint. When a route reads from that endpoint, the exchange property
that I set is no longer there. This is how I am sending the message:
Exchange exchange = ExchangeBuilder.anExchange(camelContext)
.withProperty("command", MessageTypes.GENERATE_NUMBERS_COMMAND)
.withBody(generateNumbersCommandMessage.toByteArray())
.build();
fluentProducerTemplate.withExchange(exchange)
.to(commandUri)
.send();
I am reading from the same URI to feed a route where I log the exchange:
from(mainRouterConfig.commandEntrypoint())
.to("log:to.dynamic-router.command.route?showAll=true&multiline=true")
.to("%s:%s?recipientMode=%s".formatted(
COMPONENT_SCHEME, mainRouterConfig.routingChannel(), mainRouterConfig
.recipientMode()));
The exchange property is absent in the log message:
Id: 453CF424AB353C4-0000000000000000
ExchangePattern: InOnly
Properties:
{CamelToEndpoint=log://to.dynamic-router.command.route?multiline=true&showAll=true}
Headers: {CamelMessageTimestamp=1681420673229,
CamelPulsarRedeliveryCount=0, event_time=0, key=null, key_bytes=null,
message_id=0:0:-1, producer_name=standalone-0-11, properties={},
publish_time=1681420673229
, sequence_id=0,
topic_name=non-persistent://public/default/numbers/command}
BodyType: byte[]
Body: generateNumberstypesequentialstart0limit1000000
Am I doing anything obviously wrong? Or is the Pulsar component eating
exchange properties?
Thanks,
Steve