You essentially answered your question while asking it, it is of
course more efficient to retain resources (connection as you said, but
also the session and any sender/receiver) and reuse them if you can.

On Tue, 7 Sept 2021 at 13:12, Millieret, Xavier
<xaviermillie...@eaton.com> wrote:
>
> Hi all,
>
> I am currently doing a library above qpid-proton in cpp (0.34).
> This library must offer 2 patterns, request/reply, and publish/subscribe.
>
> I play with all samples provided by qpid-proton cpp/examples/....
>
> And my question is:
>
>   *   Is the best way, is: building a class who extend 
> proton::messaging_handler, building a container with this class, run it, and 
> after do all stuff with it (so the container and the class is shared inside 
> my library) ?
>   *   Or each time when I want to send a message on a queue or on an topic, I 
> must build the class runt it, through a new container, and destroy it, just 
> after than the job is done.
>
>
>
> I know with some others libraries (JMS, Mqtt), the best way is keep a 
> connection alive, and building sessions (from this connection) to send 
> message on a queue or on topic.
>
>
>
> So my question is, how to use qpid-proton library to be as efficient as 
> possible.
>
> Best regards
>
> Xavier Millieret
>
>
>
> ________________________________
> Eaton Industries (France) S.A.S ~ Si?ge social: 110 Rue Blaise Pascal, 
> Immeuble Le Vis?o - B?timent A Innovall?e, 38330, Montbonnot-St.-Martin, 
> France ~ Lieu d'enregistrement au registre du commerce: Grenoble ~ Num?ro 
> d'enregistrement: 509 653 176 ~ Capital social souscrit et liber?:EUR 
> 16215441 ~ Num?ro de TVA: FR47509653176
>
> ________________________________
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org

Reply via email to