Giter VIP home page Giter VIP logo

Comments (5)

edenhill avatar edenhill commented on May 8, 2024

2.2.2.2:9092 is not answering and thus the TCP connectioning is waiting in the CONNECT state waiting for a positive or negative reply from the remote host - but since there is no such host the connection attempt will have to timeout.
If you wait for a couple of minutes I think you will get a timeout error.

from librdkafka.

edenhill avatar edenhill commented on May 8, 2024

If request.required.acks != 0 (defaults to 1) the message will eventually timeout and you will get a delivery report.

from librdkafka.

salebab avatar salebab commented on May 8, 2024

Thank you, but is there any method to wait for connection (for x ms) and then to produce a message?

from librdkafka.

edenhill avatar edenhill commented on May 8, 2024

rdkafka tries to remove all that logic from the client.
All the client needs to do is say where the brokers can be reached and then
start producing or consuming messages:
rdkafka will handle everything else; connects, disconnects, errors, etc.
If the broker is not available or takes time to connect to the messages
will be queued locally inside rdkakfa for "message.timeout.ms", eventually
sending the
message when the broker becomes available, or timing out the message when
the timeout is reached.
This async approach provides high throughput and makes the application's
design easier since it does not need check or maintain any state for the
kafka cluster.

What the application may do is register an err_cb to receive error reports
from librdkafka.
Connection failures are reported with error code
RD_KAFKA_RESP_ERR__TRANSPORT.

2014/1/10 Aleksandar Babic [email protected]

Thank you, but is there any method to wait for connection (for x ms) and
then to produce a message?


Reply to this email directly or view it on GitHubhttps://github.com//issues/59#issuecomment-32035459
.

from librdkafka.

salebab avatar salebab commented on May 8, 2024

Thanks a lot, I learned a lot from you and your code. ;)

from librdkafka.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.