Discussion:
[openjms-developer] msgs that should have been deleted after delivery stay until openjms restarted
Jim Marshall
2006-05-22 20:16:17 UTC
Permalink
Hi. I've got a bit of an unusual problem.

Because it takes a few seconds for openjms to start up, my client code checks
for the existence of the openjms server by just trying to create a connection.
When that fails, the client will wait for a little while to give openjms a
chance to start up and then tries again. This case will almost never happen,
but I thought I'd add it anyway.

My problem is that if the client fails to connect because openjms is not
running, then it waits and I start openjms, then the client connects again
successfully, I receive the messages (using .receive(1) and AUTO_ACK), but they
do not get deleted from the queue. If I try to read them again by restarting
the client they are not delivered. But, the admin interface says the messages
are still there. Once I shut down and restart openjms, the messages are gone.
I'm not sure what's happening here.

I'm not sure if this matters but I'm using openjms as the jndi provider, and
the client is intercepting the jndi naming exception that occurs when I do the
context lookup in order to know when to wait for openjms to start up.

I'm using OpenJMS version 0.7.7-alpha-3 with all the default configs, and the
tcp connector. Everything is running on my local machine. Thanks for any help.

Jim
Tim Anderson
2006-05-24 07:45:52 UTC
Permalink
Yep it's a bug. Not immediately clear why. I'll have a look next week.

-Tim
From: Jim Marshall
Hi. I've got a bit of an unusual problem.
Because it takes a few seconds for openjms to start up, my
client code checks for the existence of the openjms server by
just trying to create a connection.
When that fails, the client will wait for a little while to
give openjms a chance to start up and then tries again. This
case will almost never happen, but I thought I'd add it anyway.
My problem is that if the client fails to connect because
openjms is not running, then it waits and I start openjms,
then the client connects again successfully, I receive the
messages (using .receive(1) and AUTO_ACK), but they do not
get deleted from the queue. If I try to read them again by
restarting the client they are not delivered. But, the admin
interface says the messages are still there. Once I shut down
and restart openjms, the messages are gone.
I'm not sure what's happening here.
I'm not sure if this matters but I'm using openjms as the
jndi provider, and the client is intercepting the jndi naming
exception that occurs when I do the context lookup in order
to know when to wait for openjms to start up.
I'm using OpenJMS version 0.7.7-alpha-3 with all the default
configs, and the tcp connector. Everything is running on my
local machine. Thanks for any help.
Jim
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to make
your job easier Download IBM WebSphere Application Server
v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&
dat=121642
_______________________________________________
openjms-developer mailing list
https://lists.sourceforge.net/lists/listinfo/openjms-developer
Tim Anderson
2006-06-06 13:12:48 UTC
Permalink
Actually, I take it back. I can't reproduce.
Are your messages are set to expire? If so, and the messages expire before
they are consumed, references to them will remain until either:
1. the consumer tries to consume them
2. the server is restarted
The admin interface will also report messages being present.

-Tim
Post by Tim Anderson
Yep it's a bug. Not immediately clear why. I'll have a look next week.
-Tim
From: Jim Marshall
Hi. I've got a bit of an unusual problem.
Because it takes a few seconds for openjms to start up, my client
code checks for the existence of the openjms server by just trying to
create a connection. When that fails, the client will wait for a
little while to give openjms a chance to start up and then tries
again. This case will almost never happen, but I thought I'd add it
anyway.
My problem is that if the client fails to connect because openjms is
not running, then it waits and I start openjms, then the client
connects again successfully, I receive the messages (using
.receive(1) and AUTO_ACK), but they do not get deleted from the
queue. If I try to read them again by restarting the client they are
not delivered. But, the admin interface says the messages are still
there. Once I shut down and restart openjms, the messages are gone.
I'm not sure what's happening here.
I'm not sure if this matters but I'm using openjms as the jndi
provider, and the client is intercepting the jndi naming exception
that occurs when I do the context lookup in order to know when to
wait for openjms to start up.
I'm using OpenJMS version 0.7.7-alpha-3 with all the default configs,
and the tcp connector. Everything is running on my local machine.
Thanks for any help.
Jim
Loading...