Hey Bhavesh,
But isn't the problem here that you are trying to send messages after
closing the producer?
I think what I am saying is that since calling close is something the user
initiates we don't need an api for this--you can keep track of this
yourself, right?
-Jay
On Mon, Oct 6, 2014 at 11
I agree with that statement that if producer is closed and try to send
message it will give close. What we have done is wrap the NEW Producer API
with Old Producer API. So when I use same code with OLD I do not get this
issue. It is only problem with NEW Producer. Regardless of close, state I
t
Hey Bhavesh,
This is a sanity check. If you send a message after calling close on the
producer you should get this error. It sounds like you have multiple
threads sending, and you close the producer in the middle of this, then you
get this error. This is expected.
Perhaps I am misunderstanding?
Hi Kafka Dev Team,
*java.lang.*
*IllegalStateException: Cannot send after the producer is closed.*
The above seems to bug. If the ProducerRecord is in flight within send
method is execute and another thread seems to shutdown in the middle of
flight will get error.
Thanks,
Bhavesh
On Sun, Oct
Hi Kafka Dev Team,
The use case is that we need to know producer state in background Threads
and so we can submit the message.
This seems to a bug in trunk code. I have notice that KafkaProducer itself
does not have close state and inflight message will encounter following
issues. Should I file
HI Kafka Dev,
I would like to request state check state so I can manage the Life Cycle
of Producer better. I you guys agree I will file Jira request. I just
give state of producer can be I would like mange or start (create new
instance of producer) or restart or close based on state. I just