On Tue, 2015-10-13 at 14:28 +0200, Tomáš Šoltys wrote: > All right, I think I am finally cracking it. > > Please correct me if I am wrong. > > PN_LINK_FLOW is not meant for sending but for "Updates the flow state > for > the specified link." as stated in specification (2.7.4 Flow - OASIS > Advanced Message Queuing Protocol (AMQP) Version 1.0). > > I can send message any time I want if there is enough credit on a > link.
You are right. In AMQP, messages flow in one direction, credit flows in the other. In proton, receiving a FLOW event means you have received credit but you don't have to use it right away, you can accumulate it and use it when you want. In an application where you expect continuous flow of messages you probably want to react to FLOW events because it i s normal to be blocked with messages to send but no credit. But you can also have the opposite situation, having credit but no messages to send. In that case, when you do have a message you can send immediately. > > Regards, > Tomas > > 2015-10-12 13:04 GMT+02:00 Tomáš Šoltys <tomas.sol...@gmail.com>: > > > Hi, > > > > in reactor example, message is sent on PN_LINK_FLOW event. > > > > Let's say that I have a client that needs to send messages on user > > input. > > Is there a way how to "force" reactor API emit PN_LINK_FLOW event? > > > > Thanks, > > Tomas > > > > >