activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabriel Almeida Goncalves <>
Subject Re: Can consumers acknowledge/confirm receipt of a message versus auto acknowledgement?
Date Wed, 05 Jun 2019 19:59:23 GMT
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);

It seems that there are analogous mechanisms in the library you're using:
 Line 142: cms_status cms_acknowledgeMessage(CMS_Message* message);
Line 52: cms_status cms_createSession(CMS_Connection* connection, CMS_Session** session, CMS_ACKNOWLEDGMENT_MODE

Gabriel Almeida Goncalves 
Superintendência de Desenvolvimento 
Diretoria de Desenvolvimento 

----- Mensagem original -----
De: "Timothy Bish" <>
Para: "users" <>
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, 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....

> (
> 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

> Thanks!  Kim
> --
> Sent from:

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."

View raw message