webMethods

 View Only
Expand all | Collapse all

Kafka adapter message consuming process

  • 1.  Kafka adapter message consuming process

    Posted Wed January 18, 2023 07:23 AM

    Hi,

    I am new to Kafka implementation and using wM kafka adaper to consume messages from a Topic in Kafka(client side). What I noticed is, even if there are multiple messages present in topic, sometimes Listener/listnerNotification consumes 2 messages from the topic and sometimes 1 message at a time. On what criteria does a consumer fetch messages from Topic. Is there is any setting apart from Connection/Listner properties needs to be looked upon. Due to this behaviour there is issue coming in our code implementation. Below is snippet from server log:

    Consumed {1} messages
    AyncListenerNotification : runNotification() start
    AsyncListenerNotification :: received msg count :1
    Publishing for notification : started.
    Publishing for notification : ended.
    AyncListenerNotification : runNotification() end
    Time taken to execute notifications in seconds:0

    Consumed {2} messages
    AyncListenerNotification : runNotification() start
    AsyncListenerNotification :: received msg count :2
    Publishing for notification : started.
    Publishing for notification : ended.
    AyncListenerNotification : runNotification() end
    Time taken to execute notifications in seconds:0

    Thanks & regards,
    Garva


    #kafka-adapter
    #Integration-Server-and-ESB
    #webMethods
    #Adapters-and-E-Standards


  • 2.  RE: Kafka adapter message consuming process

    Posted Wed January 18, 2023 10:36 AM

    I have only played around with the Kafka adapter, and although I did not run into the issue you’re describing, I do understand that there is a property called max.poll.records that you can set to control how many messages get consumed at once. My understanding, however, is that this property is set to 500 by default so I don’t believe this property is the reason why you’re only getting one or two messages at a time. Nevertheless, you can try playing with it to see if has any impact.

    This property is set in the adapter connection’s “Other Properties” field, e.g. max.poll.records=50

    Hope this helps,
    Percio


    #Adapters-and-E-Standards
    #webMethods
    #Integration-Server-and-ESB
    #kafka-adapter


  • 3.  RE: Kafka adapter message consuming process

    Posted Thu January 19, 2023 12:26 AM

    Thanks for response Percio. I will try setting the property as suggested and update the behavior.


    #kafka-adapter
    #Adapters-and-E-Standards
    #webMethods
    #Integration-Server-and-ESB