Skip to content

Mass-publishing messages results in QAbstractSocket::UnconnectedState #57

@J4nsen

Description

@J4nsen

Hi,
I'm emitting a lot of JSON messages from a thread (QAmqpClient runs in the main thread). About 100k-500k in less than 10s. The first 50k messages are correctly received by the exchange. After that the connection to RabbitMQ gets disconnected:

[11:33:31] unknown: void QAmqpClientPrivate::sendFrame(const QAmqpFrame&) socket not connected: QAbstractSocket::UnconnectedState

Disabling confirms delays the problem a little bit, and waitForConfirms + enabling confirms results in a segmentation fault (Have not analyzed this further).

This is my class which publishes the messages: https://gist.github.com/J4nsen/40da0d436e4f8e00dbdbb5cc0860b20f

What is the best way to fix this problem? Implement a local queue/rate limiter and give the main thread some time for its main event loop? Or should I investigate in segfault with waitForConfirms?

Thanks,
Jan

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