I'll defer to the Java experts on the details of Proton-J. My
experience is with Proton-C.
Proton is single-threaded. You cannot call Sender.send from within your
cursor-waiting thread. You need a way to awaken the Proton thread when
the cursor has new data so you can invoke Sender.send from the Proton
thread.
This is exactly how a message broker works, replacing the cursor with a
queue. There are probably several examples of how this can be done. I
know that both the Apache ActiveMQ and ActiveMQ-Artemis brokers use
Proton-J for AMQP connectivity. Perhaps you can take a look at how
those projects solved this problem.
-Ted
On 07/08/2016 04:02 PM, Artem wrote:
Ted,
yes, the cursor associated with a link 1 to 1. And no, i don`t know about
reactive programming model.
If my cursor waiting function processing at own thread and when it is onData
function invoke if can i send data to proton link using Sender.send? (like
at this example)
<https://github.com/apache/qpid-proton/blob/master/examples/engine/java/src/main/java/org/apache/qpid/proton/examples/Spout.java#L56>
Artem
--
View this message in context:
http://qpid.2158936.n2.nabble.com/Broker-with-live-data-tp7647047p7647134.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]