Skip to content

hotspot issue with sendMessageAsync on partition level #116

Open
@raiusa

Description

@raiusa

We have been using kafka-net code to produce message to kafka broker in production. Recently we found that producer code is producing most of the messages to a specific partition number. Based on my understanding it should be equally distributed across all partitions.
Here is snippet of code:

    Dim serverUris = Me.GetServerUris()
   ' build Kafka message(s) and send/write to topic
    Dim options As New KafkaOptions(serverUris)
    Dim router As BrokerRouter
    Try
        router = New BrokerRouter(options)
    Catch ex As Exception
        Dim msg = ex.Message
    End Try

    Dim messages As New List(Of Message)
    For Each messageText As String In serializedMessages
        Dim message As New Message(messageText)
        messages.Add(message)
    Next

    Using client As New Producer(router)
        client.SendMessageAsync(Me.TopicName, messages).Wait()
    End Using

I don't know why it's happening. Please advise me what should I do to fix this issue. It's really critical and breaking our prod env.
Waiting for your response.
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions