Thanks Rafael , Hope this should complete rest of part of question ,
1> Let say I have created sender on queue as target (Queue Node is receiver) , now when I am enquequing the message to queue as Sender , How I will get link credit from receiver when at this time I have zero credit. ,I want to know when Reciever will pass link credit to sender using flow packet , how Receiver get to know that somebody want to send message to him so that he can pass credit or how many credit sender needs . 2> do it is necessary to create Receiver (consumer) on Queue to pass link credit to Sender ?? Regards, Rakesh On Tue, Mar 19, 2013 at 11:14 PM, Rafael Schloming <r...@alum.mit.edu> wrote: > In general the idea is that "credit" represents how many messages a > receiver can handle at a given point in time. The sender never sets this > amount independently (except for initializing it to zero), he only sets it > to what the receiver has told him. As for what you do as a sender when you > don't have sufficient credit to send messages, you simply have to wait for > the receiver to tell you that they can handle more messages. This > guarantees that the sender will never send more messages than a receiver > can handle. > > On Tue, Mar 19, 2013 at 11:48 AM, Rakesh Kushwaha <kushwah...@gmail.com > >wrote: > > > I am looking for > > how link credit protocol works with respect to producer and consumer . > > > > my main confusion points are , > > > > 1> let say I have any create producer API which should in turn create > link > > with sender role (amqp protocol), > > what should be link credit for this producer (at create producer > API) > > so the it can enqueue message. > > > > Initially the receiver hasn't told the sender anything, so the protocol > specification defines the initial link credit for a producer to be zero. > > > > > > 2> In case ,sender is done with all link credit then how It gets link > > credit again when It tries to enqueue message . > > > > like in case of sender gets flow per-formative frame with drain > flag > > (flow (drain= true))set as true , it has to consume all link credit , how > > it will again get link credit . > > > > Off course if I am not able understand above two points , I may be > > missing something else also :). > > > > The only way the sender ever increases its credit levels is when the > receiver tells it to do so by sending a flow performative with additional > credit. This applies both to the initial case, and to the drain case you > mention above, and would also apply if the producer simply sent enough > messages that the credit level fell to zero. > > I hope this helps. Let me know if you still have questions. > > --Rafael >