You are viewing a plain text version of this content. The canonical link for it is here.
Posted to proton@qpid.apache.org by Tomáš Šoltys <to...@gmail.com> on 2015/10/12 13:04:22 UTC

ractor - sending message

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

Re: ractor - sending message

Posted by Chuck Rolke <cr...@redhat.com>.
Correct. If a link has credit then you may send a message over it.

However, there is also a session flow control that considers all of its links in aggregate. Some pictures are in https://netprototalk.wordpress.com/2015/10/01/amqp-as-a-network-protocol-2/

Even though you send a message to a link it may not make it onto the network until the session has a large enough open window to accept it.

-Chuck

----- Original Message -----
> From: "Tomáš Šoltys" <to...@gmail.com>
> To: proton@qpid.apache.org
> Sent: Tuesday, October 13, 2015 8:28:49 AM
> Subject: Re: ractor - sending message
> 
> 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.
> 
> Regards,
> Tomas
> 
> 2015-10-12 13:04 GMT+02:00 Tomáš Šoltys <to...@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
> >
> 
> 
> 
> --
> Tomáš Šoltys
> tomas.soltys@gmail.com
> http://www.range-software.com
> (+420) 776-843-663
> 

Re: ractor - sending message

Posted by aconway <ac...@redhat.com>.
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 <to...@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
> > 
> 
> 
> 

Re: ractor - sending message

Posted by Tomáš Šoltys <to...@gmail.com>.
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.

Regards,
Tomas

2015-10-12 13:04 GMT+02:00 Tomáš Šoltys <to...@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
>



-- 
Tomáš Šoltys
tomas.soltys@gmail.com
http://www.range-software.com
(+420) 776-843-663