On Wed, Sep 23, 2020 at 8:10 AM umohank <umoh...@gmail.com> wrote:

> Hi,
>
>   Client :  C++ QPID Messaging
>   Broker : ActiveMQ Artemis
>
>    I am facing CPU high issue.
>    Creating temp queue and waiting for the message in recevier.fetch()
> call.
>    Getting CPU *20+% in release built 32bit* for the below code.
>
>
>       try {
>                 connection.open();
>                 Session session = connection.createTransactionalSession();
>                 Receiver receiver = session.createReceiver("Temp");
>                 char szControlPlane[512] = { 0x00 };
>
>                 receiver.setCapacity(512);
>                 session.sync();
>                 while (true)
>                {
>                         Message request;
>                         if (receiver.fetch(request, Duration::SECOND * 5))
>                         {
>                         }
>               }
>          }
>
> Is there any think I am missing OR waiting for message in receiver.fetch
> taking more CPU?
>

I believe that the receiver.fetch function will return immediately with
'false' if the receiver is closed.  It's possible that there was some error
in the attaching of the receiver to the broker.


>
> Thanks,
> mohan
>
>
>
> --
> Sent from:
> http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
> For additional commands, e-mail: users-h...@qpid.apache.org
>
>

Reply via email to