[
https://issues.apache.org/jira/browse/CAMEL-18187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-18187.
---------------------------------
Resolution: Fixed
> slack: inconsistent message payload when batch ends
> ---------------------------------------------------
>
> Key: CAMEL-18187
> URL: https://issues.apache.org/jira/browse/CAMEL-18187
> Project: Camel
> Issue Type: Bug
> Components: camel-slack
> Affects Versions: 3.14.3
> Reporter: Luca Burgazzoli
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 3.14.4, 3.18.0
>
>
> When polling multiple events from slack, there is an inconsistent of the
> payload generated for the exchange that complete the batch:
> - This is an exchange part of the batch (CamelBatchComplete=false) and as it
> can be observed, the bodyType is com.slack.api.model.Message
> {code}
> 10:47:28.470 INFO [raw] (Camel (camel-1) thread #1 - slack://demo) Exchange[
> Id: B2F6BECBBE1B6C2-0000000000000001
> ExchangePattern: InOnly
> Properties:
> {camel.route.route1.B2F6BECBBE1B6C2-0000000000000001=io.smallrye.metrics.app.TimerImpl$Context@1bcda3c3,
> CamelBatchComplete=false, CamelBatchIndex=0, CamelBatchSize=2,
> CamelToEndpoint=log://raw?multiline=true&showAll=true,
> eventTimer:camel.exchange=io.smallrye.metrics.app.TimerImpl@7d791b4c,
> eventTimerContext:camel.exchange=io.smallrye.metrics.app.TimerImpl$Context@53f8d078}
> Headers: {}
> BodyType: com.slack.api.model.Message
> Body: Message(...)
> ]
> {code}
> - This is the exchange that closes the batch (CamelBatchComplete=true) and as
> it can be observed, the bodyType is byte[]:
> {code}
> 10:47:28.477 INFO [raw] (Camel (camel-1) thread #1 - slack://demo) Exchange[
> Id: B2F6BECBBE1B6C2-0000000000000001
> ExchangePattern: InOnly
> Properties:
> {camel.route.route1.B2F6BECBBE1B6C2-0000000000000001=io.smallrye.metrics.app.TimerImpl$Context@328e8fdf,
> CamelBatchComplete=true, CamelBatchIndex=1, CamelBatchSize=2,
> CamelToEndpoint=log://raw?multiline=true&showAll=true,
> eventTimer:camel.exchange=io.smallrye.metrics.app.TimerImpl@7d791b4c,
> eventTimerContext:camel.exchange=io.smallrye.metrics.app.TimerImpl$Context@53f8d078}
> Headers: {Content-Type=application/json,
> org.apache.kafka.clients.producer.RecordMetadata=[]}
> BodyType: byte[]
> Body: {"type":"message","subtype":"bot_message", ... }
> ]
> {code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)