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

Claus Ibsen commented on CAMEL-18187:
-------------------------------------

Yeah there is something odd, I see an empty body with pooled exchanges

{code}
09:46:53.487 [Camel (camel-1) thread #3 - slack://test] INFO  sink - 
Exchange[Id: 3627EB01F7517B0-0000000000000003, ExchangePattern: InOnly, 
Properties: {CamelBatchComplete=false, CamelBatchIndex=0, CamelBatchSize=3, 
CamelToEndpoint=log://sink?showAll=true&showAllProperties=true}, Headers: {}, 
BodyType: com.slack.api.model.Message, Body: Message(type=message, 
subtype=null, team=T06MULGG5, channel=null, user=U06MWFG8N, username=null, 
text=2, blocks=[RichTextBlock(type=rich_text, 
elements=[RichTextSectionElement(type=rich_text_section, 
elements=[RichTextSectionElement.Text(type=text, text=2, style=null)])], 
blockId=O9Zln)], attachments=null, ts=1655711206.761289, threadTs=null, 
intro=false, starred=false, wibblr=false, pinnedTo=null, reactions=null, 
botId=null, botLink=null, displayAsBot=false, botProfile=null, icons=null, 
file=null, files=null, upload=false, parentUserId=null, inviter=null, 
clientMsgId=706da455-2a1d-4612-bf24-aeed3b3e1717, comment=null, topic=null, 
purpose=null, edited=null, unfurlLinks=false, unfurlMedia=false, 
threadBroadcast=false, locked=false, replies=null, replyCount=null, 
replyUsers=null, replyUsersCount=null, latestReply=null, subscribed=false, 
xFiles=null, hidden=false, lastRead=null, root=null, itemType=null, item=null)]
09:46:53.487 [Camel (camel-1) thread #3 - slack://test] INFO  sink - 
Exchange[Id: 3627EB01F7517B0-0000000000000004, ExchangePattern: InOnly, 
Properties: {CamelBatchComplete=false, CamelBatchIndex=1, CamelBatchSize=3, 
CamelToEndpoint=log://sink?showAll=true&showAllProperties=true}, Headers: {}, 
BodyType: null, Body: [Body is null]]
09:46:53.488 [Camel (camel-1) thread #3 - slack://test] INFO  sink - 
Exchange[Id: 3627EB01F7517B0-0000000000000005, ExchangePattern: InOnly, 
Properties: {CamelBatchComplete=true, CamelBatchIndex=2, CamelBatchSize=3, 
CamelToEndpoint=log://sink?showAll=true&showAllProperties=true}, Headers: {}, 
BodyType: com.slack.api.model.Message, Body: Message(type=message, 
subtype=null, team=T06MULGG5, channel=null, user=U06MWFG8N, username=null, 
text=3, blocks=[RichTextBlock(type=rich_text, 
elements=[RichTextSectionElement(type=rich_text_section, 
elements=[RichTextSectionElement.Text(type=text, text=3, style=null)])], 
blockId=uHEV)], attachments=null, ts=1655711208.197219, threadTs=null, 
intro=false, starred=false, wibblr=false, pinnedTo=null, reactions=null, 
botId=null, botLink=null, displayAsBot=false, botProfile=null, icons=null, 
file=null, files=null, upload=false, parentUserId=null, inviter=null, 
clientMsgId=1cdf4d24-94eb-4134-acc8-ea996d24b766, comment=null, topic=null, 
purpose=null, edited=null, unfurlLinks=false, unfurlMedia=false, 
threadBroadcast=false, locked=false, replies=null, replyCount=null, 
replyUsers=null, replyUsersCount=null, latestReply=null, subscribed=false, 
xFiles=null, hidden=false, lastRead=null, root=null, itemType=null, item=null)]
{code}

> 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
>            Reporter: Luca Burgazzoli
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 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)

Reply via email to