Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-18187

slack: inconsistent message payload when batch ends

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.14.3
    • 3.14.4, 3.18.0
    • camel-slack
    • None
    • Unknown

    Description

      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
      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(...)
      ]
      
      • This is the exchange that closes the batch (CamelBatchComplete=true) and as it can be observed, the bodyType is byte[]:
      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", ... }
      ]
      
      

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            davsclaus Claus Ibsen
            lb Luca Burgazzoli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment