You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Ian Newborn <ia...@revolutiongames.net> on 2009/11/19 16:20:03 UTC
C++ client for ActiveMQ discarding messages before reaching the consumer
Hi there,
I'm trying to use ActiveMQ with the C++ API (CMS).
Trying is the key phrase here. On some clients when connecting to some
servers the messages seem to be discarded somewhere inside the API.
Using Wireshark we can see them arriving via the socket and the logging
from ActiveMQ shows it reaching as far as the API.
However, on clients that do work the message is responded to with an
acknowledge and is also passed to the consumer. On the clients that
fail the messages aren't acknowledged and my consumer doesn't even know
something has happened.
There doesn't seem to be a reason why some machines can't connect to one
server but can to another. All exist on the same subnet and the only
differences in the logs are from the unique ID's.
It would be really helpful if someone knew how to get CMS to tells us
why it has decided not to acknowledge some of these messages or if
anyone knows of some setting we should be initialising by default and
have might have missed? All that we use currently the address of the
server and the port number.
Re: C++ client for ActiveMQ discarding messages before reaching
the consumer
Posted by Timothy Bish <ta...@gmail.com>.
On Fri, 2009-11-20 at 01:19 -0800, Saurbaum wrote:
>
>
> Timothy Bish wrote:
> >
> >
> > It would be helpful to know what version of the client you are using
> > along with some more info about your clients such as the acknowledgement
> > mode you are using, whether or not you are setting expiration times on
> > messages etc. There's just not enough information here to give you a
> > definite answer.
> >
> > Regards
> > Tim.
> >
>
> Turns out it was the expiry time on the messages with system clocks not
> being synced closely.
>
> Is there some setting you can use in CMS (latest release) so that when it
> logs the messages it'll state it's reasons for discarding a message? Or is
> that left as an exercise for the reader?
>
> Ian
There isn't any option that will do that no. You can add logging in the
consumer code to do so if you want, the method "afterMessageIsConsumed"
in ActiveMQConsumer.cpp would be the single point to do that as all
expired messages get marked as consumed there.
Regards
Tim.
Re: C++ client for ActiveMQ discarding messages before reaching the
consumer
Posted by Saurbaum <ia...@revolutiongames.net>.
Timothy Bish wrote:
>
>
> It would be helpful to know what version of the client you are using
> along with some more info about your clients such as the acknowledgement
> mode you are using, whether or not you are setting expiration times on
> messages etc. There's just not enough information here to give you a
> definite answer.
>
> Regards
> Tim.
>
Turns out it was the expiry time on the messages with system clocks not
being synced closely.
Is there some setting you can use in CMS (latest release) so that when it
logs the messages it'll state it's reasons for discarding a message? Or is
that left as an exercise for the reader?
Ian
--
View this message in context: http://old.nabble.com/C%2B%2B-client-for-ActiveMQ-discarding-messages-before-reaching-the-consumer-tp26428118p26433432.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: C++ client for ActiveMQ discarding messages before reaching
the consumer
Posted by Timothy Bish <ta...@gmail.com>.
On Thu, 2009-11-19 at 15:20 +0000, Ian Newborn wrote:
> Hi there,
>
> I'm trying to use ActiveMQ with the C++ API (CMS).
>
> Trying is the key phrase here. On some clients when connecting to some
> servers the messages seem to be discarded somewhere inside the API.
> Using Wireshark we can see them arriving via the socket and the logging
> from ActiveMQ shows it reaching as far as the API.
>
> However, on clients that do work the message is responded to with an
> acknowledge and is also passed to the consumer. On the clients that
> fail the messages aren't acknowledged and my consumer doesn't even know
> something has happened.
>
> There doesn't seem to be a reason why some machines can't connect to one
> server but can to another. All exist on the same subnet and the only
> differences in the logs are from the unique ID's.
>
> It would be really helpful if someone knew how to get CMS to tells us
> why it has decided not to acknowledge some of these messages or if
> anyone knows of some setting we should be initialising by default and
> have might have missed? All that we use currently the address of the
> server and the port number.
It would be helpful to know what version of the client you are using
along with some more info about your clients such as the acknowledgement
mode you are using, whether or not you are setting expiration times on
messages etc. There's just not enough information here to give you a
definite answer.
Regards
Tim.
--
Tim Bish
http://fusesource.com
http://timbish.blogspot.com/