Hi Kim.

I don't know if this will help, but I guess its possible..

I'm using the Apache.NMS.ActiveMQ for C#. There, to acknowledge messages 
individually, 
we must chose the AcknowledgeMode.IndividualAcknowledge when instantiating a 
session and then
call Message.Acknowledge for each message. Like:


 mySession = 
connection.CreateSession(AcknowledgementMode.IndividualAcknowledge);
 (...)
 myMessage.Acknowledge();

It seems that there are analogous mechanisms in the library you're using:

https://github.com/fusesource/fusemq-c/blob/master/fusemqc-client/src/main/cpp/CMS_Message.h
  Line 142: cms_status cms_acknowledgeMessage(CMS_Message* message);

https://github.com/fusesource/fusemq-c/blob/master/fusemqc-client/src/main/cpp/CMS_Session.cpp
 Line 52: cms_status cms_createSession(CMS_Connection* connection, 
CMS_Session** session, CMS_ACKNOWLEDGMENT_MODE ackMode)


Gabriel Almeida Goncalves 
Analista 
Superintendência de Desenvolvimento 
Diretoria de Desenvolvimento 
(31)3311-6739

----- Mensagem original -----
De: "Timothy Bish" <tabish...@gmail.com>
Para: "users" <users@activemq.apache.org>
Enviadas: Quarta-feira, 5 de junho de 2019 15:09:10
Assunto: Re: Can consumers acknowledge/confirm receipt of a message versus auto 
acknowledgement?

On 6/5/19 12:18 PM, leejacks...@cox.net wrote:
> Hi!  We have a consumer written using the cms_browserGetNextMessages function
> written by Apache

I don't see this Apache person you mention listed in the committers for 
the that project....


> (https://github.com/fusesource/fusemq-c/blob/master/fusemqc-client/src/main/cpp/CMS_QueueBrowser.cpp)
> that is written in C programming language.
> We are experiencing missing messages.  We post messages to a JMS Gateway.
> The Gateway sends to a broker and we consume the messages off this broker.
> Is it possible to have the consumer code confirm or acknowledge each message
> individually?  Right now the behavior we are seeing seems to indicate the
> consumer is auto acknowledging the messages in the broker at one time.

It is unclear what you are asking for here, you reference a QueueBrowser 
implementation but are asking about consumer code so I'm not sure what 
you are looking to do.  A QueueBrowser doesn't support any acknowledge 
types as it is a non-destructive view of messages on a Queue.  The 
browser also makes no guarantees about it showing you every message on a 
Queue so if you are relying on that property then you will likely run 
into trouble.

Looking at the source code for the C wrapper client a message consumer 
could have acknowledgment types other than auto specified, the values 
are here

https://github.com/fusesource/fusemq-c/blob/master/fusemqc-client/src/main/cpp/cms.h#L82


>
> Thanks!  Kim
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>

-- 
Tim Bish

-


"Esta mensagem do SERVIÇO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO), empresa 
pública federal regida pelo disposto na Lei Federal nº 5.615, é enviada 
exclusivamente a seu destinatário e pode conter informações confidenciais, 
protegidas por sigilo profissional. Sua utilização desautorizada é ilegal e 
sujeita o infrator às penas da lei. Se você a recebeu indevidamente, queira, 
por gentileza, reenviá-la ao emitente, esclarecendo o equívoco."

"This message from SERVIÇO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO) -- a 
government company established under Brazilian law (5.615/70) -- is directed 
exclusively to its addressee and may contain confidential data, protected under 
professional secrecy rules. Its unauthorized use is illegal and may subject the 
transgressor to the law's penalties. If you're not the addressee, please send 
it back, elucidating the failure."

Reply via email to